Updated cachematrix.R file with code for Programming Assignment 2