Fix unhanded throwing of errors when using asynchronous mode

This closes issues #17 and #18 by making `asyncFileToBuffer` and `lookup` properly handle asynchronous errors. The tests have also been updated to test the asynchronous error cases.