Add some URL cleanups to the API-Mate tool

This means you can just copy/paste the URL from various sources, and it's less likely to break.

In particular, this fixes:
* URLs that contain a trailing slash after /api (it will be removed)
* URLs that are missing the /api on the end (it will be added)