Two notes:

1. This change is not related to what you want to fix in this commit. (Correct me if I am wrong.) Please move it to a standalone commit. That way when somebody in the future is trying to figure out why this particular piece of code was written in the way it was, he won't be confused by unrelated changes.

2. It's been some time since the support for rc files was added, I think we can safely drop support for config.json now. That should be done by a new commit, possibly a new pull request.

For the sake of this pull request, please revert the changes in L161-L170.