Refactor recurisve module compile with promises

Refactored recursiveModuleCompile to return a promise, with some other simplifications targeting ease of understanding.

Refactored other code that uses recursiveModuleCompile to use a more natural promise style.
if ` compiler.writeTreeToFile(tree, resolvedOutputFile);` fails you wll not `revertCwd();` as the this rejection handler is merely a sibling to the fulfillment

`then(..).catch(..)` is likely what you should do. It a bummer es6 promises don't have finally yet