Check version number in records

Fixes #3.
Check flags before decrypting entry with public-key

This is in preparation for support of symmetric encryption, see #8.
Add status functions for intermediate steps in tests