adding a invert argument in test_dir to negate the filter