Fix 649

* Don't process parser if lexer processing failed. For some errors, such as failing to locate a target, this prevents multiple reports of the same error. Either way, if the lexer in a combined grammar could not be generated the parser wouldn't work anyway.
* Make sure the target exists and loads successfully before running the code generation pipeline.
* Update `CodeGenerator.getTemplates()` to return null instead of throwing a `NullPointerException` if the target could not be loaded.

Each of the changes above combine to form a solution to #649.