setmysqlpass: be more careful before plundering into action

Since this script is rooting the database, it'd be good to use a little
more precaution so that we don't let systems be in an inconsistent case
when crashing.

In cases where the PATH variable is not appropriately set (variable is
empty by default when script is invoked by puppet) the script shuts down
mysql and then is not able to call most commands.
log output on failure for the mysql_set_rootpw exec

this behaviour should have been the default much earlier, but it was
only changed to it for puppet 3. without the script's output on
failures, one can have a pretty hard time figuring out what's actually
happening.