open file to write with binary flag

This fix will handle issues where image_path is used within a .js.erb file. This fix stops jasmine-rails from throwing a "ASCII-8BIT to UTF-8" error.

Related to issue: https://github.com/searls/jasmine-rails/issues/64