Mark appropriately, without premature end

Fix #83

Do the stat() call only when necessary, right before emitting the event
and then moving on to the next item (or EOF) in the queue.
v3.2.9