Fix for manual and auto post-processing (global name 'dirName' is not defined).