Fix writing non-ascii notebooks in Python 2

Don't assume that json gives us str