Make sure we do not segfault with invalid mode passed to fopen() and co. Add note about allowing different errno to be returned.
Changed paths: