Split code generation script into its own file

This keeps the POM easier to understand, while providing the actual code
generation logic within the project itself.
Remove trailing slashes from directory properties

Maven does not typically include the trailing slash in properties that
configure a directory path. So let's not do that here either.