V-LEDs.com has some slick resistor mounting plates. I'd recommend putting one of those somewhere and mounting those resistors to them. Keep in mine as long as the resistor is in line, you're fine. They don't need to be mounted directly against the headlamp.
Are Vleds still selling these? Couldn't find them