Best way is a UPS. You should be able to get a fairly small one which shouldn't cost that much. I picked up a 300W UPS at a local office supply store for US$60 - which is pretty cheap. If not then you could make your own form of UPS using a car battery, a battery charger, and a 12V -> mains power inverter.
But fundamentally what you are asking is: I want to have a way to store power so that when the power goes out I can keep going but I don't want to buy a UPS. But what you want is exactly what a UPS is. The home-brew UPS using the car battery and inverter will work, but unless you have the parts lying around, it will probably end up costing more.