Update cachematrix.R

Added code for Assignment 2