Added directory parameter to ForkSupport.runJavaAndWait.