Write the torrent file as binary

I was having encoding errors with some files, like this one:

    .gem/ruby/2.1.0/gems/mktorrent-1.1.1/lib/mktorrent.rb:87:in `write': "\xAF" from
      ASCII-8BIT to UTF-8 (Encoding::UndefinedConversionError)

Any thoughts on how to test this?