Update cachematrix.R

Code for assignment 2