Remove the trailing slash added to $basepath

Shouldn't be there, and if it is the basepath page won't load. Add the slash to the rewrite rules that need them directly.