Remove trailing empty lines.