[tests] spm: use const_mkdtemp() instead of tempfile.mkdtemp
[entropy.tools] restore python3 compatibility on newly tested functions
[tests] use const_mkdtemp() instead of tempfile.mkdtemp()