Handle directories that are matched as files

The file watcher can inadvertently pick up directories that have extensions in their name (`Dir.glob("**/*.*")`). This causes `FileUtils.cp(from_path, to_path)` to throw an exception.