New file comparison utility (a minimalist cmp written in SML).
Fix minor EmitTeX bug (introduced in 1032a64e1).

Use new cmp tool to check more elaborate munger example in
theory_tests directory.