- Use cleanup() as general purpose cleanup function which also writes
mails in case of errors and always removes the lockfile.
- Set ERRSTAT = 10 in case the mysql backup isn't finished and report
subsequently as a failed backup.
- Add .log suffix for the logfile.