Fix for Python version >3.0

Replaced use of print functions with ```stdout.write()```.
Should fix issue #10.