Corrected issue with creation of output directory