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.