notify: fix data races on fsnotify_bsd

Related to #29. I still need to check how it's behaving on Linux.