Added configuration regexes.
Factored out filesystem code.