Protecting remote atomic entanglement against spontaneous emission by separated photonic pulses