trap SIGTERM and SIGINT for cleanup

useful for e.g. killing a hanging jenkins build