Normalize line endings and clean trailing space