Resolves concurrency issue described in #25.
Fix callback issue

Does a quick last minute check to see that the callback isn't undefined before calling it.

This fixes an issue under windows and latest node version.
Only test on sane node versions