I'm guessing recommending an UPS would be too obvious.
http://www.amazon.com/CyberPower-CP4...cyberpower+ups
Likely wouldn't keep your computer up for long, but with the power panel software and USB connection from the computer to the UPS, it could at least offer a means of a clean shutdown at around 25% battery life.
I've got four of these for the home rack and I haven't looked back. It's saved me a lot of heartache and ass pain.
http://www.amazon.com/CyberPower-CP1...cyberpower+ups
(recommended for those with PFC power supplies in their desktops/home servers)