Path integration over closed loops and Gutzwiller's trace formula