The Dow Jones Industrial Average and S&P 500 posted lackluster moves on Monday, but their gains for August were nothing short of spectacular.