Update cachematrix.R

Solution to R Programming - Programming Assignment 2