Add support for redirected URLs

Resolves issue #18.