Fix deprecated use of File::Temp in tests

File::Temp's tempdir() was never allowed to be used
as class method like this

  File::Temp->tempdir()

This wrong usage now throws an exception since File::Temp 0.23.

Additionally the implementation behind it made the wrong usage
behave like prefixing the given template with the default
tmp dir (usually /tmp).

The fix now uses "newdir" which is the designated drop-in
replacement for class method usage and provides it with
option TEMPDIR => 1, to make the tests behave exactly like
they originally did.