Replace tabs with spaces and remove trailing spaces.