Move code to write stats to file out of this library.

This is better served in my dissertation scripts.