Update cachematrix.R

Working submission for Assignment 2