Handle multiple inotify events, not just the first

Nice library!

This pull request handles all the events returned by 'read', not just the first.

I've also made some other tweaks, but feel free just to use any changes that are useful.

(It would also be nice if it tried to dlopen a few locations for better compatibility across Linux distributions)