add --binary option and ability to open .gz and .bz2 input files