Update cachematrix.R

tested only on 1 test case