Make piprot work with Python 3.

Necessary changes were:
- using print() instead of the print statement
- StringIO has moved to io.StringIO
I've tested this branch with 2.7 and 3.3.
Merge pull request #23 from dbader/python3-fixes

Make piprot work with Python 3.