Fix script piping to stdout in Python 3

Fixes #66