fix basedir with trailing slash