dirs = set(dir for dir in (os.path.dirname(o) for o in outputs) if dir)