Fix directory creation