Instead of cutting the wire, why not just push the leads in either the JST or Molexx header? I have to use a resistor on my GP2D15, but I didn't modify the cable.
Also, like LEDs, the length of the legs isn't exactly how to determine the polarity of the capacitor. You see the thick band down one end of the cap? That's your negative, you connect that to GND. The other end goes to Vcc.