strip trailing whitespace and tabs