Avoid races on dir creation by using try/catch blocks.
Exit script on error and increment version to 1.2.