This should maybe be handled nicely by ufo2fdk
see adobe-type-tools/afdko#47
this brings up an other issue: It would be nice to send ufo2fdk a list of pre process and post process callbacks, this could be a solution to add both callbacks defined in ufo2fdk as custom callbacks. Similar to extractor customFunctions.