Better solution to py2.7.4 urlparse behavior fix