Made _iterchain more flexible (and renamed it to _closeiter)
Added a tool to build Python for tests.
Fixed two python2/3 bugs