cascache.py: Ensure path exists before trying to update the mtime

If an artifact is pulled from the cache without its buildtree,
CASCache.prune() will fail when it tries to update the mtimes
of the build tree's object files.

A new integration test has been added to tests/integration/artifact.py
which reflects this.
2 files changed