(#22129) force explicit file content to be treated as a bytestring

This replicates the implicit behavior in Ruby-1.8.7, and avoids chasing
down every location where a value is passed to `should=` and setting the
encoding there.
use :if so rspec sees the test even if it's not executed
Merge pull request #1831 from djmitche/bug22129

(#22129) force explicit file content to be treated as a bytestring