Test for permission in a way that doesn't always fail.
Fix JSON when identifiers have the same symbol.

Closes #65.
Don't generate JSON for syntax stuff.