In preparation for the transition to Python 3, convert to using the
print function. The special import
from __future__ import print_function
in Python 2.7 makes "print" become the function and not the statement.
In Python 3, it has no effect. Once the transition is done and we
exclusively use Python 3, we can simply remove the imports.
The testsuite shows no regressions.
This patch forces the scripts to use a specific directory as the root
for their own temporary directories/files. We create it as an empty
directory at the start of the testcase, and then verify at the end
that it is still empty. If not, the testcase will report a failure.
This patch also makes sure that, even if the scripts do leak some
files/directories, the testsuite catches those and deletes them.