Fix version argument handling

Handle the --version argument in a way that works
for python 2.7 and 3.3.

Signed-off-by: Doug Hellmann <doug.hellmann@gmail.com>
Update tests for python 3.3

Handle iteration in tests in a way that's compatible
with python 2.7 and 3.3.

Signed-off-by: Doug Hellmann <doug.hellmann@gmail.com>