Check if codesigning is allowed

Do you think it's worth setting up full-blown integration tests for this?

Fixes #239