Ensure that we're writing unicode in svg2pdf preprocessor

Fix Python 2 test failures with Inkscape installed.
Merge pull request #7051 from takluyver/svg2pdf-cast-unicode

Ensure that we're writing unicode in svg2pdf preprocessor