Update to cachematrix.R

Final version of the ProgrammingAssignment2 submission