Use JRuby finalization rather than deleteOnExit for Tempfile.

Fixes #1905.