Fixed a small bug and added some tests

Tests are a bit generic in their setup and for clarity it would make
sense to split the tests so they match one ignore rule against several
paths, instead of doing them all in one go. Would make the test a
little better readable.