Adds has-attachment filters to directories