redeclare readdir with correct options