Update cachematrix.R

Code updated for programming assignment version 1