modifying page_object.urlparse so that it works for python version 2.7.7+