Completing ProgAssignment2 to create cached inverse of a matrix