Update cachematrix.R

Submission of Assignment #2 with my own code (not Peng's placeholder)