Fixed regression introduced in #12 and added testcase for it.

This fixes the issue with urlparse in Python 2.6 as introduced by #12.