Correct typo and use a while(each()) loop to calculate min/max

Also adds a test for a singular value.
Re-run test import script