Multilib mashing optimization
* Only create the lists of packages and directories once, when the class
is created (not at instantiation or worse, everytime the method is
invoked)
* Use sets instead of lists for containment tests
* Reduce calling of fnmatch
* Bypass groups of tests when we know earlier that they will never be true