Moving use of mkdtemp, NamedTemporaryFile and TemporaryDirectory into its own class called Temporary: By default all temporary data is created below /var/tmp but can be changed via the global commandline option --temp-dir. This Fixes #1870