Mavenization and NPE fix

I've added a pom.xml so that PetitParserJava can easily be built using Maven.

Further i found an irritating NPE which occurs when one tries to define and action for an non-existing definition. I simply used the same error for when re-defining.