def mkdir_p(path_to_dir):
    """Make directory(ies).

    This function behaves like mkdir -p.

    Args:
        path_to_dir (:obj:`str`): Path to the directory to make.
    """
    try:
        os.makedirs(path_to_dir)
    except OSError as e:  # Python >2.5
        if e.errno == EEXIST and os.path.isdir(path_to_dir):
            logger.debug(
                "Directory %s already exists. Skipping." % path_to_dir)
        else:
            raise e
Make directory(ies).

    This function behaves like mkdir -p.

    Args:
        path_to_dir (:obj:`str`): Path to the directory to make.