I don't know the safest way to do it, but I solder up one wire, shrink the heat shrink, then solder on the other one and shrink that side.
At no point do I have both wires all stripped and ready to solder (or to weld themselves together).
In order to short the battery leads with this method I'd have to melt all the way through the heat shrink on the first wire. I suppose that's possible, but I don't think it's probable.