bzip2/lzma: handle failures from bzip2 and lzma correctly