fix the makefile
fix tar file handling

use one bizarre trick to find errors in the tar and handle them properly
as errors.
handle the package API change better