Use Java File to make path handling more robust to platform changes

This is motivated by reports of Christian Humer, hope it helps on Windows, but it is untested.

Signed-off-by: Stefan Marr <git@stefan-marr.de>