Updated cachematrix.R for R Programming assignment.