json_script: add support for aborting script processing