Add functions written for ProgrammingAssignment2 to cachematrix.R