Added a collect-metrics hook.
Merge pull request #44 from tasdomas/collect-metrics-hook

Added a collect-metrics hook.
Prefer io.Copy to needless allocation

When a charm has large files in it, reading the entire file into memory
is wasteful. When processing many charms it can cause GC problems.
Merge pull request #45 from jrwren/v3

Prefer io.Copy to needless allocation
charm: close file after opening
Merge pull request #46 from rogpeppe/015-close

charm: close file after opening