Update cachematrix.R

Homework assignment for week 2