implement inotify directory watcher

I seem to be getting a SEGV here on my 32bit server, but not on my 64bit dev machine.