error handling for invalid inputs

Added some error handling if you pass rotateMatrix a non-square matrix,
then changed test to make sure that the correct exception is being
thrown.