Fixed bugs in DirectedHypergraph and related tests