Updated cachematrix.R script