Copy and change permission of pre-commit hook