Added -g switch to mdtreeutil.py

-g
1. forces reading and writing to mmdtable format, and
2. tidies all well-formed mmd tables in the input