Fix issues with watcher never running on empty directories
Add end to end tests