A correct implementation of IO#binwrite for Ruby 1.8
When we added the IO#binwrite method to our collection of backported
features, the specification was misinterpreted and the offset was treated as
"offset in the string we are writing".
Instead, it is an instruction to seek in the output file before writing, which
meant that our semantics were all wrong - and tests broke - when we ran
against the native binwrite on Ruby 1.9.
The new implementation is correct in behaviour on all tested cases, and has a
more extensive test suite exercising all the various parts of the behaviour
that we need.
Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>