cachematrix.R is updated with required modifications

This contains the cache matrix function required by cousera for programming assignment 2