Fixed output directory creation