remove ending slash chars in rsync command so to make the script behave like rsync does with them