Refactored the filtering of files
Calls async callback on finish

Added more robust tests

Fixes #10 and fixes #11