Fix an async problem by running compile inside the getTemplates callback

In the current code, the getTemplates callback that verifies the template to use is not guaranteed to run running before the files.forEach loop.  this was confirmed by adding a small delay to the callback.

This change moves the call to run the compile stage to inside the getTemplates callback, ensuring that it will always run after custom template is resolved.

Note: If you merge the fix_spelling branch, you'll need to make sure that the references to `seperator` in this branch are updated to `separator`.