Start to a proper platform-specific area.
Start to a proper platform-specific area.
Passing the script as an InputStream seems to work around the issue of JRuby not being able to find files because ScriptingContainer passes the wrong path.
terminate() doesn't seem to cause the problem so I guess that can go back in.
Fixed the issue with scripting which prevented the sample document from working.