Properly handle empty directories.
Merge remote-tracking branch 'github/glenn/file-system' into iwehrman/watch-unwatch
More bugfixes