Update cachematrix.R

Fully working version