Fix handling of ignored_dirs

https://review.openstack.org/#/c/94717/ triggered a bug in handling of
ignore_dirs: If a file in one of the ignored directories was changed, we
might still create dependencies for it and trigger an exception. Now we
remove also modified files in ignored directories.

Change-Id: I619d6c441a4fa4759e00d9c9e21c993707b19c6b