ensureTrailingSlash

Adds a trailing slash to the URI if it does not already have one.