Revert replacement of 'tempfile.mktemp'.

Windows doesn't allow proper function with NamedTemporaryFile held open.