Python2 backwards compatability

Added try catch on urlparse import, and argparse semantics changed between python2/3.