If the switch is opened on the attached circuit, the alarm and light activate. I am having trouble adding battery back-up to the circuit. When I power the system with the batteries, it back feeds (as illustrated in red) into Relay 2. Is there a component or a method I can use to prevent the batteries from powering Relay 2 and still test the loop and power the light and alarm?
Not quite sure what you want to isolate but a diode/rectifier should do what you want. Exactly where do you want the battery current to go and where don't you want it to go?
Instead of using a relay to isolate the battery just use two diodes.
Place one at the output of the LM317 regulator to the rest of the circuit.
Connect the other at the battery output to the same output point as the other LM317 diode.
Adjust the output of the LM317 regulator is it is slightly higher than the open circuit voltage of the battery.
Use high current Schottky diodes for minimum voltage drop.