Fix permissions checks

The existing code would only check whether the player had copy or unsign permissions whenever they did anything. It wouldn't actually distinguish the permissions at all: the player could unsign books even if they didn't have the unsign permission as long as they had the copy permission, etc.

(Note that because of issue #3, I haven't actually tested that this compiles or works right in-game. I'm pretty sure the logic is sound now, though no promises there isn't a simple syntax error like a semicolon missing somewhere.)