Validate archives

Fixes #30. @dagss, please review this once you get to it.