Upload using rsync to ensure good permissions and save re-uploading files.
Fixed upload of directories.