Use codecs.decode instead of str.decode for Py3k compatibility.
Use range instead of xrange for Py3k compatibility.
Drop support for python-dateutil 1.x due to Py3k incompatibility.