PNG came out wrong because of concurrency (?) issues where the SVG file
was converted before being fully generated. The solution was to close
the temporary file between each operation.
tempfile.NamedTemporaryFile() creates **and opens** the file.
jinja2.stream().dump() will try to open the file too, if given a str
(filename). This does not cause issue on Linux, but on Windows the same
file cannot be open twice at the same time...
The solution was to pass a file pointer to 'dump()' instead of the
filename, so jinja2 does not need to open it again.
This submodule will handle saving the outfile to whatever format you
want.
For now, it can save in svg (default), png using inkscape, png, pdf or
ps using cairosvg.