Added Unit tests

Added base set of unit tests using PHPUnit and VisualPHPUnit as frontend.
Included is one logical fix to DataIterator.php to make the test cases behave sanely.