connection.py: Fixes unbound variables.
web.py: Catch and rethrows bad redirect URL errors.

Closes chfoo/wpull#87