Generalize gitignores.

Allows for easier extension building inside a submodule.