More URL checks, including detecting self redirects

Fixes #1