Move graph stuff to sha1 package, change test to a standard script for min cut.