Add gen-m.sh, a script for test runs of gen-m.