Convert the schemas using python 3

These changes seem to fix the problem with python 3 and also works for python 2. The argument data passed to write_if_different is a `str` for the rst schemas and a `bytes` object for yaml so python 3 had problems with the unicode encoding for the yaml schemas.
The unicode_escape encoding here is deliberate, because we want to display Unicode characters like `\u2830` when displaying regexs in the docs.  We'll have to have a Py3 friendly way of doing that.