Set the complete flag when importing a package.

Also add some additional error checking in the importer.

Fixes #24