Even better emulate POSIX file functions (reduced)

This is reduced version of #5694.
Only obvious fixes.
Thanks for reminding!
Any negative values must be mapped to `-1` in CFile or in here, as only `-1` is allowed in case of error according to POSIX: http://pubs.opengroup.org/onlinepubs/009695399/functions/read.html.
Any external code could compare read() result with `-1` to check for error and that's absolutely correct.