TEST: Fix invalid foreach test.

Running the following in PowerShell returns 'abc':

    foreach ($char in 'abc') { $char }

Added separate test that ensures the PSObject base objects are
used when iterating the foreach items.
Fix output when iterating through foreach.

Previously the following would output a value for each iteration.

$j = 0;
foreach ($i in 0..10) {
   $j++
}
Fix output when iterating through for loop.

Previously the following would output a value on each iteration.

$j = 0;
for ($i = 0; $i -ile 10; $i++) {
   $j++
}
Merge pull request #160 from mrward/for-loop

Fix output when iterating through a foreach or for loop