Fix file cache flush deleting .gitignore files. Fixes #1071.
Collection `map` and `filter` both return new `Collection` instances now. Closes #1125.