Make cosign testable

Wrap cosign in classtool and add a test package with a couple of minor tests.