Force input data to be treated as binary initially.

This, I think, brings ruby 2.x inline with ruby 1.9. Input text is treated as
binary until saved out into a file, when it is saved as utf-8.
Add tests for small non-ascii/utf-8 values.
Merge remote-tracking branch 'origin/master'

* origin/master:
  Simplified method of choosing which layout to use