These last days, /tmp on the buildbots have started filling up again, at a rate
of ~300MB per build. The attached patch should fix that (again!).
It doesn't to work, but as far as I can tell it didn't work before either. And
now at least it fails cleanly, without leaving any files behind.
(f=Function('file.xml'); plot(f) -> 'str' object has no attribute 'element')
I did make an effort to make it more readable (code generation by fprintf is
hard to read) by moving the logic from the code generation down to the python
level.
If this patch is not to your liking, please fix it in some other way, so I
don't have to bug Ilmar every two days to clean out /tmp.