Updated cachematrix.R code - Thanks for marking :)