Update cachematrix.R

Initial version of the code