Function removeTrailingSlash

Removes any trailing slash from a URL.