title: python3 pathlib mkdir Permission denied
body: <p>This code raised exception when I tried to create a sub dir <code>./test/123</code>  under <code>./test/</code>. And after examine the permission, I found that dir <code>./test</code> created by this code has <code>d-w----r--</code>, which is strange...If I mkdir in the terminal, that dir will have <code>drwxr-xr-x</code> permission.</p>
  
  <pre><code>from pathlib import Path
  if __name__ == '__main__':
      p1 = Path('./test')
      p1.mkdir(644, parents=True, exist_ok=True)
  
      p2 = Path('./test/123')
      p2.mkdir(644, parents=True, exist_ok=True)
  </code></pre>
  
  <pre><code>
    File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/pathlib.py", line 1267, in mkdir
      if not exist_ok or not self.is_dir():
    File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/pathlib.py", line 1358, in is_dir
      return S_ISDIR(self.stat().st_mode)
    File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/pathlib.py", line 1168, in stat
      return self._accessor.stat(self)
  PermissionError: [Errno 13] Permission denied: 'test/123'
  </code></pre>