Minor comment and string fixes.

Small tweaks, partly caused by comments on PRs #669, #690.
Set Java source files to be UTF-8.
Also correct resource leakage in `TempFileManager`.