def join_directories(base, directories):
    """join base directory of type py.path
    with a list of sub directories (strings)"""
    res = base
    for dir in directories:
        res = res.join(dir)
    return res