Update cachematrix.R

Programming assignment 2 submission for 'R Programming'