Update cachematrix.R

my solution for peer assessment for coursera.