Update cachematrix.R

My submission for Programming Assignment 2.