Update cachematrix.R

Submitting the code for Programming Assignment 2.