Remove trailing empty lines in generated files