projtool.pl: do not attempt to check unset error codes
The "do" function only sets an error code when it fails.
Attempting to clear the errors first could work, but only if the
item being "do"'d does not ever cause them to be set.
In this case the item has been set up to execute a "1" as its last
value which means there should not be any ambiguity between the
item returning "undef" as its final value and a failure causing
"do" to return "undef".
Check to see whether or not the "do" function has returned "undef"
before testing any of the error result code variables.