Reworked the DirectoryIterator line to work with all versions of PHP5

Some versions of PHP like 5.2 dont properly implement the ability to
simply foreach loop the Iterator.

Heres an example:
//   /home contains 3 directories:   larry, curly, moe
$d = new DirectoryIterator('/home');
foreach ($d as $i)
    echo "$i";

PHP 5.2 output:
larry
larry
larry

PHP 5.3+ output:
larry
curly
moe

The DirectoryIterator is still very usable with its class calls, so I reworked the code like this:

$d = new DirectoryIterator('/home');
while($d->valid()) {
	echo $d->getFilename();
	$d->next();
}

If you had say a directory with 7 files,