Fixed an access violation bug in readdir().