Update pre-script and update directory permissions.