[Fix #1011] Add pattern matching with Dir#[] for config.

But keep backwards compatibility and issue deprecation warnings for
problematic patterns such as bare file names and patterns ending with
'**'.
Merge pull request #1018 from jonas054/fix_1011_globbing

[Fix #1011] Add pattern matching with Dir#[] for config.