Remove cache if build fails

the actual logic to remove the build store should go in the buildstore package, so that if it ever changes (i.e., creates some new directory), the deletion code can be updated with it.