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.