Python3 compatibility in __main__

I tend to use this and got frustrated when it stopped working in
python3. Fixed urllib and print issues to be 2to3 compliant.
Merge pull request #25 from cameronmarlow/python3-compat

Python3 compatibility in __main__