Mortgage rates inched higher this week after the U.S. and Israel carried out attacks in Iran, sparking fears of higher energy costs.