Fixed memory leak watching directory.