Use bytes for sys.stdout.write in PY2.  Closes #161.
Merge pull request #162 from pre-commit/sys_stdout_write_py26

Use bytes for sys.stdout.write in PY2.  Closes #161.