Change rename readdir to scandir