Pass terminal setting to display utils
Merge pull request #2677 from mrallen1/fix/2627

Check for a terminal before using escapes