raise FileNotFound if stat returns nil

preventing "undefined method `directory?' for nil:NilClass" when a link
to a non-existent file is present
remove stubbing from tests
Merge pull request #513 from sonnym/guard_against_nil_stat

Guard against nil stat