Only watch directories that are writable.

Closes #1497.