This might seem like something almost too simple to mention, but it has saved me more than once.

I try to always have a pair of AA batteries in my purse. They take up very little space and they are so handy. The main reason I have them is to have a spare set of batteries for my digital camera, but I have found uses for them beyond that.
Having a spare set of AA batteries in my purse works for me.