Added memory recording to Galois benchmark in Python.
Fixes for errors introduced by memory sampling.