Fixed some bugs in package tests, and made the results from DEFPACKAGE* tests be more useful when they fail.