Sounds like you were doing everything right to me. You just got unlucky, and then really lucky.
It happens, be glad you're still alive. Spend $100 on a taillight if you want to, it'll make you feel better. Get this one:
http://www.bikelights.com/vis180.html