Changed call to squarematrix to cacheSolve, other

Changed the input check to cacheSolve. Also added production of
messages to square matrix