Clean up scripts when target process dies