Run tree_gc on exit if is_debugger_running
Fix handling of escapes in paginate_msg