Fix potential bug with count in Readdir