After Blogger ate my template, I’ve finally rebuilt it.
There are some tweaks, but I’ve learnt that you should regularly back up EVERYTHING.
I’ll probably knock up some code soon to automatically backup the template each day. It shouldn’t be hard to make, as I’ve already used the Atom API before.
I don’t think getting / setting templates is supported under Blogger’s Atom API yet (the official spec has support for it though).