Replace `isInfixOf` with proper file path check in `predicate`

It must be a bit safer now (but uglier I guess). Strings are evil.