Added check for package corruption.

Fixes #26.
Merge pull request #27 from univerio/corruption_check

Check for package corruption.