Removed the Dir.chdir in `list_files`
Removed a Dir.chdir from `command`