Reduce dependency injection

I noticed that one of the Reek warnings was concerning a high number (13) of instance variables in `QualityChecker`.

Looking into this, I see that dependency injection is being used in order to stub and set expectations during testing.

With Ruby's runtime flexibility, we can actually stub or set expectations on directly on the real classes. I've illustrated this for just `count_file` in this PR but there are several other variables this could apply to. This would help to improve the QualityChecker class by reducing the number of instance variables, simplifying the initializer, and reducing the amount of indirection.

I realise that there are other reasons for using Dependency Injection than just for testing. But since these File is a core Ruby class, it seems unlikely this would ever need to change.

What do you think?