Update cachematrix.R

Updating for assignment 2.