Make sure the generator script also creates a newline at the end of file

Similar to commit d6713f39 in master