Use of promises for readAndPreprocessFileContent, to allow asynchronous operations in scriptprocessor

Needed to have asynchronous support in the script preprocessor. Added a callback parameter to the process method and updated the core to use promises internally to accomplish this.