fix the stripping of the trailing slash off of datadir