Fixes #682.

I am on windows 7 SP1 using python 3.4 64 bit.

When trying the candlestick example I ran into issue #682. By writing the file as binary we get around the charmap issue. However to write as binary we need to convert the unicode string to bytes for Python 3... The below should also work in Python 2.6 and .7 and on none windows systems but I am unable to test that.

I used the below to help figure this out...
http://stackoverflow.com/questions/14630288/unicodeencodeerror-charmap-codec-cant-encode-character-maps-to-undefined

http://stackoverflow.com/questions/5471158/typeerror-str-does-not-support-the-buffer-interface