Updated cachematrix.R file to complete the assignment