Simplify FileUtil's Copy and GetSize functions.

Also more general, rather than platform-specific code.