added tests for Matrix implementation

The files required to implement the matrix class in a TDD-style were
added to the main branch of the library.
corrected some errors...

There were some errors that wouldn't be produced if I had written the
Matrix interface in a TDD style.

This commit should be an example about a dirty way of working. I promise
not to work this way. It's very embarrassing!