Fixed some bugs and refactored some code.

The code is still alpha and needs some refactoring and additional test
cases. Also I realized a strange behaviour on a 3.2.0-49-amd64 Ubuntu
kernel: `inotify_rm_watch()` returned unreliable results when trying
to remove a watch for a directory or file that has been deleted from the
file system. Sometimes it returned success, sometimes not.

Will investigate this. Until I have no workaround for this, I can only
ignore errors from that function. :(