- test.*: use mkdtemp and mkstemp from osc2.util.io

In some calls a dir=self._tmp_dir argument was added, in
order to have a common root for all testcase tmpdirs (cosmetic
change).