Update cachematrix.R

Final copy.