Update cachematrix.R

lexical scoping assignment 2 for R