fix basedir without / at the end