Ensure `get_base_url()` does not include a trailing slash.

Clean up a few other URLs and add tests.

Closes #274.