handle binary files when writing to stdout
handle binary files when writing to stdout

and still supports text. according to python docs this approach should
work on both unix and windows OSes.

informatics-isi-edu/deriva-py