def make_tmp_dir(prefix):
    """
    Create a temporary directory

    :param prefix(str): Name prefix for the new directory
    :return: a string with the resulting name of new directory
    """

    # Time in ISO8601 format
    now = datetime.now().isoformat()

    # A random UUID is appended to the output directory in order to
    # avoid name collisions
    f_uuid = uuid.uuid4().hex

    # Directory name and path
    out_dir = "{out}/{p}-{now}-{uuid}".format(out=_output_dir, p=prefix,
                                              now=now, uuid=f_uuid)

    # create the actual directory
    if not _dry_run:
        os.makedirs(out_dir)
    log.msg_debug("Output directory: {out_dir}".format(out_dir=_output_dir))

    # Return a string containing the name and path of the output directory
    return out_dir
Create a temporary directory

    :param prefix(str): Name prefix for the new directory
    :return: a string with the resulting name of new directory