Make extra care to work with strange file names using the -z argument of git ls-files