Update cachematrix.R

corrected some errors