Ensure that walks through empty directories finish

At present, empty directories prevent 'end' from being emitted effectively halting the system using the module.