We keep fire extingishers in all our vehicles. they are designed to withstand the temperature swings you'd expect in a vehicle.
the main problem i've seen is where the extinguisher is old and not charged when needed.
also...if your engine catches fire, DON'T open the hood, spray the extinguisher in through the front grill of possible. Most car fires are electrical in origin and in the cabin though.