Added NSError.isNoSuchFile.
Fix use of error codes.

Codes from errno should use NSPOSIXErrorDomain, not NSCocoaErrorDomain.
Add a doccomment.
Change NSInputStream.writeToFile:attributes: to return a negative
errno on failure, rather than just -1.
Check the return value of removeItemAtPath, and log any error.
Check the result of malloc.