(Fixes #837) Better checking for excluded files when individually specified

Description of problem is in #837.

I believe the tests are failing in this branch because of #838 -- config from previous tests are leaking over and affecting others. I am quite confused how this code change effected these errors, but I'm not sure whether they should be fixed here or in a separate branch.