'Creates output directory.  Returns full path to output directory.'

def __mkoutdir(self, outdir):

    path = os.path.realpath(outdir)
    if os.path.exists(path):
        return path
    try:
        os.mkdir(path)
        return path
    except OSError:
        pass
    except:
        self.warn('Unable    to    create    a    directory    for    file    dump')
        raise
    if os.path.exists('/tmp'):
        path = os.path.realpath(os.path.join('/tmp', outdir))
    if os.path.exists(path):
        return path
    try:
        os.mkdir(path)
        return path
    except:
        self.warn('Unable    to    create    a    directory    for    file    dump')
        raise
