Add new version of cachematrix.R for Assignment2