Investing in companies that have favorable ratings on environmental, social and governance (ESG) issues has become increasingly popular. But investors might do better targeting companies with poor ESG ratings and a clear commitment to mend their ways.