regtest: move md5sum wrappers into separate file