Fixing directory creation