dir.c: pass flags to openat(2) correctly
Flags are 3rd argument of openat(2) while the 4th argument
(mode_t) is unnecessary for our uses. This bug exists since
Ruby 2.5 from r58860 and was discoverd by strace.
* dir.c (nogvl_opendir_at): use openat correctly
[Feature #13056] [Feature #14346]
merge revision(s) 61754: [Backport #14346]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_5@62427 b2dd03c8-39d4-4d8f-98ff-823fe69b080e