Additions by Marc Tajchman to read MED files.

Inclusion of proposed improvements. The unit tests successfully ran, in various configurations.