A path integral for heavy quarks in a hot plasma