Move the Groovy test support test to the test support package.
Fix template handling (and error handling)
Fix script handling and Gradle plugin.
Fix some compiler warnings.