Strip trailing whitespace for most common file types