Update cachematrix.R

test if is a square matrix