Trim trailing spaces and convert tabs to spaces.