Scott Cook explains why he's now grateful that disaster nearly struck his financial software company during its early days.