Move File.exists logic inside the closure

This allows the dumpDir field to be easily overriden.
Merge pull request #244 from nilesh-c/configdumpdir

Move File.exists logic in Config into the closure