Merge pull request #1697 from apache/juerg/artifact-cache-opt

_artifact.py: cache(): Optimize capture of metadata files