Silencing coverity issues

[trivial, not reviewed]

Coverity wisely warned about not looking at the return values of
stat() and lstat(), which I had ignored in my first implementation.
Here, I throw an internal error if they fail which is a lame-ish
short-term fix that I took, knowing that the isDir()/isLink()
utilities are right around the corner, will have good error
handling, and that I can use them once they're available.
Merge pull request #453 from bradcray/filerator

Silencing coverity issues

[trivial, not reviewed]

Coverity wisely warned about not looking at the return values of
stat() and lstat(), which I had ignored in my first implementation.
Here, I throw an internal error if they fail which is a lame-ish
short-term fix that I took, knowing that the isDir()/isLink()
utilities are right around the corner, will have good error
handling, and that I can use them once they're available.