Allow importing when sys.stdout is reassigned on Python 3

Closes gh-30
Merge pull request #31 from takluyver/stdout-bytes-py3

Allow importing when sys.stdout is reassigned on Python 3