SIFD-6 adding the 'b' for binary flag to the write method, hopefully this will fix the Encoding::UndefinedConversionError