proto-shell: move script handler dump code to handler.c