Fix dot serialization of undirected graphs, as well as dot tests