Added patch to call the callback passed into compileFile in the event of an error thrown in compile

When a callback is passed into compileFile in swig.js, this patch catches any errors thrown when calling compile and invokes the callback with an error instead.  

While this patch  doesn't make sure all calls are async when a callback is specified (a minor issue), this patch does address the main crux of issue #338, which is to ensure the callback is called instead of having the error be thrown.