use File.open( .., 'w') instead of File.write so it works in --1.8 mode
Use JRuby finalization rather than deleteOnExit for Tempfile.

Fixes #1905.
Merge remote-tracking branch 'origin/jruby-1_7'

Conflicts:
	core/src/main/java/org/jruby/ext/tempfile/Tempfile.java