index: check for valid filemodes on add
Merge pull request #2380 from libgit2/cmn/index-add-modes

index: check for valid filemodes on add