cleanup remote_dir