moved the readdir function to the watcher class as it belongs