Classical paths for a quadratic action with memory and exact evaluation of the path integral