Corrected directory creation bug