Change around file handling argument parsing code.

These new functions are to work around Java File API brokenness.