Add tests for matrix multiplication

Also write a dot() function in python for now since using numpy's dot()
wasn't producing the expected results.  Numpy was likely expecting a
slightly different format.