Command line interface to filesystem matcher

Also fix a couple of bugs in the matcher algorithms