Update cachematrix.R

Solution to assignment 2