Last time didn't get it apparently, so use a 2-pronged approach to
ensure we only run exit handlers once:
1. Use POSIX::_exit instead of the Perl exit builtin to ensure we skip
running the END { } Perl blocks that control our exit handler.
2. Record the PID when we start and have the exit handler only continue
if it's still the same PID.
This was brought to my attention by Ralf Jung as well (he ended up with
a lot of stray .kdesrc-build-data files from kdesrc-build trying to
record persistent data on shutdown to "current directory").
kdesrc-build still writes to the wrong location if you use a
./kdesrc-buildrc (note the order of . and /), but at least it only
writes the wrong location once now in my testing.