set encoding for pipe to binary mode

railties/lib/rails.rb specifies default internal and encodings of UTF_8.  If that ever gets required before a test using a pipe runs, writing the data to the pipe will fail unless we set the read and write of the pipe to binary mode. 

This gist contains a simple example of that: https://gist.github.com/annaswims/8481896