Be even more resilient in error checking. Do not rely on errno.

errno might have an unpredictable value on the more esoteric Unices.
Merge pull request #549 from kacfengine/noErrno

Be even more resilient in error checking. Do not rely on errno.