added function create_remote_directories()