Update cachematrix.R

Final changes to assignment 2