Edited the cachematrix.R file

Edited the cache matrix.R file according to the assignment for the R
Programming Coursera MOOC.