Escape filenames correctly so spaces are allowed

This fixes a bug where, if the cwd has a folder with
space in it, staged-git-files crashes.