util.inspect properly formatting arrays with colors

This is a fix for Issue #5039 - line length is now computed without color codes.