Fix subshell issue in git validation script