fixes #2081
using rtrim
Merge branch 'master' into fixing-windows-datadir-master
Merge pull request #2244 from owncloud/fixing-windows-datadir-master

remove trailing slash from data dir on windows