Refactored the invokeAndPromisify function so exceptions in the transfor...

...m function are now propigated back to the application code.

The get, put, post and delete callbacks are now invoked asynchronously so I have updated the tests to to match.