Teenager Timo Werner scored twice as Stuttgart secured an important 3-1 victory at Freiburg to stay close to the European places in the Bundesliga.