Using `from __future__ import absolute_import`, and `from functools impo...

Using `from __future__ import absolute_import`, and `from functools import reduce` to increase py3k compatibility.