Adds fix for JSON dump as 'wb'.

- Uses io.open() to fix Python 3 unicode->str translation issue.