Fixing directory creation, kind of hacky