Alter atexit functions to not run on DevAssistant exit, but on assistant execution end. Fixes #281.