Unchanged files still count as files.
Let recursive removal also remove the top dir.
If item is a directory, remove its contents from the database as well.

Fixes bug #1257