rename cwd to dir