Pyinotify behaves oddly when the stdio file descriptors are closed.