Update cachematrix.R

This is the solution by RajeevGM to the wk3 proj work of coursera course rprog-004