inotify, directory: fix memory leak.

NOTE: ref counting enables auto deleting of empty directories, so maybe
I should drop purge_empty.