UPS battery as auxiliary power supply for car - charging and detecting car on
I meant for this to be a comment but it was getting too long to fit, so:

1) I don't think hooking up two batteries in parallel is a good idea (even WITH a diode), and it's not guaranteed to charge your second battery (Lead acid battery voltages change linearly and to get a appreciable charge rate you need a voltage differential above nominal). If you wanted to guarantee safe, you can always get an UL/ETL listed inverter for that 12 volt socket, and then get a UL/ETL listed 12 volt lead acid battery charger. I don't think you'll manage to find a 12 volt input to 12 volt output battery charger because the voltage is not right. Also note your diode is like an additional 1 volt drop so you really will have a tough time charging your battery if that port is regulated (though if it come straight from the alternator you might pull it off).

2) A cursory glance suggests to me that this setup would work, though I might be missing something.

Addendum: While the inverter-charger setup seems to be a bit complicated (and more costly), I think it would provide you with a far higher degree of safety. If you really want to know if your car is on, you could just run a fused connection to your ignition switch to a relay. You would consume zero current while the car was off (assuming the switch was OPEN), and you would also provide isolation with "automotive grade" parts.