instead of Strings, instance_methods returns an array of Symbols in Ruby 1.9; Write the image file with the binary flag set for encoding purposes