Updated cachematrix.R

Updated cachematrix.R file for programming assignment 2