Feature/improve find and scan code

Part of fixing #856 and #858. I'm stilling missing the follow config option, but rest should be more or less done, or at least ready for review.
This and the other plain exceptions still need to be replaced with a ``FindError`` or something along those lines. We could perhaps have it contain an ``errno`` and ``message`` and then use that instead of ``OSError`` as well.