Updates the cachematrix.R and finishes the Assignment2