I was going to suggest that same process.Make up your own lead.
use that existing end to connect to the power supply.
Note which wire is 1, 2 and 3
Cut the wire off a reasonable distance from the plug.
Purchase 3 pin connector from a vendor like Ray Wu or AHH
Connect the new male connector end to the lights.
Connect the female connector to 3 core cable extension.
Put the old male end on the other end of the 3 core extension.
Make sure you solder and heat shrink each wire join after you have confirmed the wire / plug connections are correct