Update cachematrix.R

Assignment solution.