add py3k support, drop 2.5- support, add tests