Replaced len() so it works with multibyte chars.

Characters such as "é" were counted as two, e.g. len("é") would return "2". Using strdisplaywidth() instead of strlen() and len() gives us the correct length (also considers "^I", that is, tab characters).