Bug 994690 - Refactor config loader to use promises and add unit tests t...

...o it