Track when an inotify descriptor has been closed

Closes #1