Updated cachematrix.R file for Assignment 2