General comment: No files should be generated in the test!
Only memory files StringIO.
We should consider changing the interface such that it will be easy to do that.