Update cachematrix.R

Alex Jones' version of cachematrix.R