Fix directory creation when moving