Surely all you need, and I speak from experience here is:
1. A rechargeable battery, as used in alarm systems(Maplins).
2.A Battery Charger.(Also Maplins)
2. A cheapo timer, to ensure that the battery is always charged, but not overcharged(1.99 at Poundstretcher).
3. A 2 pole mains relay, from the bins under the dark arches in Leeds @99p.
When the power goes off, one pole of the relay switches from the normal power unit plugged in to the mains, to the battery, the other switches out the charger, which is dead anyway (I'm not sure that that's necessary, but I just happened to have a scrap 2 pole relay).
I used to use such an appartus to safeguard my radio cassette from missing my favourite programmes 15 or 20 years ago.
At a guess, using a sophisticated experiment last night, the modem won't notice the momentary break of power.
Of course, you could incude a car battery connected to a trickle charger, I just used what I had knocking about at the time.
_________________________
Politics and Ideology: Not my bag