(#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
(#22362) Changes in const_defined?() on ruby 1.9 break Puppet::Util::Classgen
Merge pull request #1864 from ptomulik/fix/master/rmclass_const_defined

(#22362) Changes in const_defined?() on ruby 1.9 break Puppet::Util::Cla...
Merge pull request #1831 from djmitche/bug22129

(#22129) force explicit file content to be treated as a bytestring
Merge branch 'master' of https://github.com/puppetlabs/puppet