added thread lock to RecursiveDirectoryWatcher.