Remove trailing slash(s) from basedir path

Remove the trailing slash from userDefined baseDir, otherwise the outputfile will contain too many slashes and errors will show up if the list is used in other circumstances. E.g. when doing inputSandbox downloads via LFNs containing more than one slash.
Merge pull request #2061 from andresailer/patch-1

[v6r11] Remove trailing slash(s) from baseDir path