Replace tabs with spaces and remove trailing whitespace.