Improved the rsync commands for directory and file sync