Chennai Super Kings got their act together in the nick of time to eke out an eight-run win over Royal…