Use git ls-files -z to be safer with filenames.

Not that anyone will add filenames with weird characters, but we may as
well be safe.