Mason's Theorem for Directed Linkages