Update PosixDirEntry in scandir.py to use same logic as version in posixmodule.c