Title-holders Stuttgart are back in the German Cup final thanks to a 2-1 extra-time win over Freiburg.