Modify main.py to save output depending on saveEdgeSpecies attribute

This was very useful for debugging and has been requested by the other
developers
to become official.