How to force the shutdown of the PIC18
You might consider a comparator for VCC, and when it goes low use an interrupt to bring the program to a quick stop before the power goes totally out, instead of taking your chances with a cold power off.

Edit:
Might be a bit easier said than done, as Vcc for your comparator would also change.  You'd need to use a voltage regulator to generate Vcc from a higher voltage, then monitor Vsupply through voltage divider to keep it in range of the comparator.

Alternatively, if this is super-important and the above isn't suitable, you could switch to a microcontroller with better power monitoring tools.