'Return the pathname of a directory on the host suitable
for temporary file storage.
The directory and its content will be deleted automatically
on the destruction of the Host object that was used to obtain
it.'

def get_tmp_dir(self, parent='/tmp'):

    self.run(('mkdir    -p    %s' % parent))
    template = os.path.join(parent, 'autoserv-XXXXXX')
    dir_name = self.run(('mktemp    -d    %s' % template)).stdout.rstrip()
    self.tmp_dirs.append(dir_name)
    return dir_name
