Update cachematrix.R

Submission of final code for grading.