Update cachematrix.R

Completing the code for assignment #2