Fix maps race in append_test, merge_test, and graphviz_test

Fixes #53 . I fixed `merge_test` and `append_test` by using the maps as a reference of presence and appending directly to the array. It does not add any memory complexity and only adds a little time by checking for key existence in a map.

`graphviz_test` was fixed by comparing against an in-memory graph rather than text-based.