Faster check for trailing whitespace

We always compare with `head`. We don't care about ASCII filenames or not.