I bought a bunch of 3-prong replacement plugs at a hardware store, then trimmed the power cords to the length I wanted and, referring to a book on electrical wiring, made sure I hooked up the wires correctly in each plug (it helps to be paranoid about this). Now I have a rack that's not quite the mare's nest it used to be.
I should mention that each of my racks has a rack-mount power strip (Furman).