Refactor the #whitelisted_files method

Because

```
    case x
    when Regexp
      y =~ x
    else
      y == x
    end
```

is the same as
```
   x === y
```

assuming that `x` is a Regexp or a String.