Replace StringIO with tempfile, to reduce memory footprint when working with large files.
Replace StringIO with tempfile, to reduce memory footprint when working with large files.

tsileo/bakthat,anttivs/bakthat,mafrosis/bakthat,preeto/bakthat,tsileo/bakthat