Here's the wiring:
The dotted alternative wiring would keep the circuit powered after shut down and the fan will run until the temp switch is satisfied, if you aren't worried about running the battery down from the fan running until it cools down the switch. Which can take some time and if the switch were to fail closed it would run the battery dead. It would be wired in lieu of the switched power source. And technically that wire should be 10 ga wire b/c it is protected by a 30 amp fuse, although I wouldn't worry about it that much being it is only powering a relay and does have a fuse.
All the battery to fan wiring should be 10 ga. but the switched +12v wire and the wire to the fan switch can be 14 or 16 gauge. If the source of the switched wire is unprotected with a fuse you can put a 5 or 10 amp fuse inline close to its source. Getting a relay wiring loom/connector pigtail is cheap and simplifies wiring and mounting the relay. They are available at any auto parts store.
FYI, in the event that the fan temp switch were ever to fail open and create an overheating situation you can simply ground the wire going to it and the fan will run constantly when the car is running, allowing you to get back home or continue to drive the car until a replacement can be installed.