add ‘recursive’ option to prevent search descending into subdirectories

this should just be
```js
if (err) return cb(err)
```
and you can drop the `fail` function and `failed` var