Use consistent shell code/diagnostics in pmie/pmlogger scripts