Be happy it's just the battery. I had the battery replaced today by the "genius bar" guys after my computer exhibited the exact same symptoms. Just shuts down randomly when battery is running down instead of going to sleep or giving warning message. Heck, mine would go from 100 down to 90, then boom, shut off.
They replaced the battery, but I still have more problems. Over heating, locking up, rebooting, shutting off, stuck cursor (no mouse response), and more. They just want to keep on fixing it. Strange thing is, I get it back and its not fixed. I have had enough of the not genius bar, and apple care (or apple doesn't care).