fix watch_dir handling. Fixes #420