Added --record and --replay for recording and replaying minimisation runs to aid debugging.