Fixed crash when removing a directory that is being watched.