Fix #11: Improve Python 3 support.
Fix #18: Integrate urlparse test cases.