At the moment when using a custom path you backup the existing arm9loaderhax.bin and then overwrite it and then move the new arm9loaderhax.bin to the new path (and rename) and then restore the backup right?
But this means that if the update fails for some reason or I want to cancel it I can no longer boot my 3DS without downloading a new copy of my bootloader and placing it on the SD card.
If it was done in a tmp directory then there is no chance of messing anything up.
If you get the latest A9LH you can boot without SD card to a Mini Luma CFW, making it possible to boot, rename the file, and reboot from the 3DS.
What I do is:
I download the ZIP. I rename the original payload to something else, I extract the ZIP, then the payload, and if you're using a custom path, I rename the original payload back. I don't overwrite any payload. If you're using a custom path, the payload at the root will be the same. If you're not, the old copy will be renamed to something else using time and date. Let's be honest. Any "failed update" is never good. Even with the official Nintendo updater, a failure can brick your device. Corbenik Updater simply renames stuff, it doesn't delete the old files unless they are on a custom path. I'm not sure if custom path bins are deleted, but if they are, I'll make it so they are renamed. I'm not entirely sure, actually.
The only thing I'd change would be to check the SHA512 hash of the file prior to installing, as to prevent failed updates. I'm still looking into using SHA512 with Lua, actually.
I don't see any point in a temp directory.
Now that I look at it, I might make some changes, the installation code looks weird.
--------------------- MERGED ---------------------------
I spotted some potential issues for people who use arm9loaderhax_si.bin as their main payload, although I've never encountered any issues.
Should be fixed in the latest OTA update.