Clean up terminal after exit.