cut: fix appending to unused cut buffer and support for wide characters