backup: Returning from log function if level is stderr
backup: handling unhandled errors

* trapping ERR, which will catch all unhandled errors from errexit
* writing stderr to a tmp file as well as to stderr to aid in debugging in the case of an unhandled error while running unattended