If you need more time you can add more/bigger capacitors.

Or, if you really want to make sure the data is saved and you have the room and an extra PIC pin...

Run the PIC from a rechargeable battery or battery pack, have the mains keep a float on the battery.
Rig a MOSFET/transistor/relay as a self holding relay with the PIC doing the holding.
When the interrupt triggers the PIC can save the data, close the windows and put the cat out. Then shut
it self down.

When it is time to start the system have a momentary switch to energize the "relay". If you want it to come on automatically. Add another relay that the mains control to put the initial power to the relay. One the PIC starts it will do the holding.