Update cachematrix.R

Tested and added test case example