Update cachematrix.R

Submission for Assignment 2.