U.S. stocks ended higher on Friday, snapping a three-day losing streak, as an inflation reading met market expectations and eased investor concerns.