Starting framework for excluding files

Also rework and comment some of the db read/write logic for maintainability.
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.
More work on exclude logic
more exclude-file logic
Add to CHANGELOG
Merge pull request #22 from eapache/exclude-files

Exclude files