Update cachematrix.R

Updated cachematrix.R. Still should add appropriate commenting.