fix git handling for filenames with spaces