Update scandir calls in compile.php