Updated to create leading remote directories and remove source directory name on putDirectory()