bug fixed: remote dir is being created even if there are 0 files to upload