update for py3k

Fixed the following syntax issues across repo:
- print statement -> print function
- import StringIO -> import io.StringIO
- StandardError -> Exception
- exception <Exception> as ...
- urlparse -> urllib.parse.urlparse
- httplib.HTTPConnection -> http.client.HTTPConnection
Merge pull request #39 from pyxnat/py3kfix

update for py3k