Validate slashes in code

If we're going to require such important restrictions, especially if they're contradictory (trailing slash for one, none for the other), lets enforce that in code.