Added better support for execution of the external JAD process.