mi text reading/writing

The functions now seem to work, and ReadMiText is forgiving of blank
lines and comments.