Updated cachematrix.R

Update for peer assesment