how to restore complete Safari sessions
Obviously this wasn't a solution at the time you asked the question, but if you're looking for more basic, it's now built into the latest version of the operating system.

Safari in Lion does seem to remember the history for each tab when it restores on re-launch. If you were using 10.5.8 because you use PPC hardware, or don't want to buy the upgrade, this doesn't help, but it if Lion is a viable choice, it does seem to work very smoothly.