fixes SkipDir behavior on non directories