make update-index --chmod work with multiple files and --stdin