Update cachematrix.R

submission of ProgrammingAssignment2