hooks/patches: fix parsing .{diff,patch} name
Merge pull request #397 from asergi/master

hooks/patches: fix parsing .{diff,patch} name