Update cachematrix.R

Solution to Programming Assignment 2