Fix bug where history would not be saved sometimes
Fix bug where history would not be saved sometimes

Specifically, when program would terminate naturally as oposed to being
terminated with the `q` command.

davidmowrer/in_class_projects_t2,guilherme/byebug,ozydingo/byebug,os97673/byebug,scalp42/byebug,k0kubun/byebug,icebreaker/byebug,webdev1001/byebug,webdev1001/byebug,deivid-rodriguez/byebug,miamiruby/byebug,guilherme/byebug,os97673/byebug,deivid-rodriguez/byebug,guilherme/byebug,yui-knk/byebug,davidmowrer/in_class_projects_t2,icebreaker/byebug,miamiruby/byebug,davidmowrer/in_class_projects_t2,yui-knk/byebug,saisai/byebug,saisai/byebug,deivid-rodriguez/byebug,yui-knk/byebug,k0kubun/byebug,scalp42/byebug,ozydingo/byebug,k0kubun/byebug