Corrected a couple of Unix API issues reported by static analysis.