Add retry for directory detector tests