Changes to graph_mapper.py

Switches to using `collections.defaultdict` (https://docs.python.org/2/library/collections.html)
which saves querying whether a key exists and then adding an empty set.