Add mutex to avoid PHAR parallel deployment exceptions.

To be reviewed :)