When the stock market falls, your first instinct might be to panic. But now is the time to follow the cardinal rules of investing.