Switch to file descriptors instead of FILE *.

This allows us to support the io modes more accurately, not truncating for create/write, etc.
Attempt to virtually handle truncation properly.

Fixes LittleBigPlanet save problem, at least on US.
Improve error handling when PARAM.SFO can't read.
Merge pull request #5454 from unknownbrackets/io-minor

Improve truncation handling on all platforms