factory-archiver: handle the error cases of tar command

Implement the logic for error cases of tar command.

In addition,
 - fix and improve the clean-up and in the unittest.
 - add "gpg -k" to trigger the first initialization.

BUG=chrome-os-partner:27567
TEST=make lint LINT_WHITELIST=\
"py/lumberjack/archiver.py \
 py/lumberjack/archiver_cli.py \
 py/lumberjack/archiver_config.py \
 py/lumberjack/archiver_exception.py \
 py/lumberjack/common.py \
 py/lumberjack/archiver_unittest.py "
TEST=make test

Change-Id: I61069c7e7115f78f59991e55417ab269c229be0a
Reviewed-on: https://chromium-review.googlesource.com/198160
Tested-by: Chun-ta Lin <itspeter@chromium.org>
Reviewed-by: Ricky Liang <jcliang@chromium.org>
Commit-Queue: Chun-ta Lin <itspeter@chromium.org>
3 files changed