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.