Generates the target path for a directory

def make_dir_path(project_dir, root, project_name):
    """
    Generates the target path for a directory
    """

    root = root.replace('__project_name_snake__', project_name)
    real_dir = path.realpath(project_dir)
    return path.join(real_dir, root)