(Reuters) - The S&P and the Dow edged higher on Wednesday as energy and financial stocks rose, but gains were capped by worries over tensions on the Korean peninsula and a potential U.S. landfall of Hurricane Irma.