expire the dirents_cache correctly and fix a bug discussed before