Add a few parser unit tests

If you make changes to the parser, please add a unit test following
this simple template.
Destroy incomplete policy DOM on parsing errors