allow unicode URLs on Python 2

on Python 2 `u'é'.decode('utf8')` fails with UnicodeEncodeError, but only AttributeError is caught.

This only calls decode on known bytes objects.

includes a test that succeeds on 2.4.1 and fails on 2.4.2