Even better emulate POSIX file functions

Added small fixes and workarounds in VFS, a number of fixes in emulated functions.
NOTE: emulated functions require a huge refactoring/update/rewrite, this is the minimal set of fixes. Last commit can be discarded, but I don't think that it can break anything in broken emulation (support for any VFS without Seek() was fully broken).
mind factoring that out? one condition per line with comment?