Merge branch 'valentindavid/script-artifact-corruption' into 'master'

Fix cache corruption by scripts when layout and integration commands are used

Closes #749

See merge request BuildStream/buildstream!934