Fixed a problem with the IndexMatrixTest
Fixed error checking in saxpy example.