Update cachematrix.R

Final Code for Programming Assignment 2