Fix bug of knownFuncs usage when findFiles is called recursively

Since `knownFunc` is closed into `findFiles` function, it isn't shared when the function is called recursively.

I added an extra argument `knownFunc` to `findFiles` and made it pass to its recursive call.

I also added a small test code. I like [`stretchr/testify`](https://github.com/stretchr/testify) for easy assertion. If you don't, I'll rewrite the test code only using `testing` package.