to me it sounds like you're not putting out enough voltage at idle to keep your ignition working. Check your grounds, rust, paint and under-hood goo aren't very effective conductors. When you're sure the grounds are good check the voltage the alternator is putting out at idle - there's a wide range of quality when it comes to rebuilt electrical components - it can range from a quick bath in a part washing tank followed by a blast of fresh paint to a rue rebuild where the everything is inspected, bearings replaced, windings redone, reassembled and tested -