Improving the output when exporting from the GUI to m files.

Following up on various suggestions made by @trefethen.