fixes print function on assumption there is no need to support a version of python before 2.6
changing urlparse import to get required parts and adding equivalent for python 3 for the expected import error