More excluding-files work.

Patterns still need figuring out (e.g. pattern "test" does not match path
"./test/a/b" which is annoying) but the metadata is saved correctly at least.