Use python3-style print-function
Use python3-enforced explicit relative imports

Starting with Python 2.6 these are available without further redo.
In Python 2.5 you need the statement:

    from __future__ import absolute_import

For further information on Python2 v Python3 portability issues, see:

http://docs.python.org/3/howto/pyporting.html
Specify text-mode for files and pipes explicitly

While in python2 it was possible to implicitly convert between binary
data ('bytes' objects) and strings ('str'), python3 enforces a strict
distinction of these types. It is necessary explicitly convert binary
data to text by specification of the encoding.

Using text-mode on file-object level allows to take advantage of the
default locale and builtin capabilities.
Support old versions of python2.X by catching relative import syntax error
Fix broken test

unittest.TestCase.assertAlmostEqual should only be used to compare
numbers. For some reason the test passes anyway on python2.7 and
python3.
Flatten package to become a single module

As the package essentially consists only of one module it is natural to
treat it as such, namely only one module. This also saves headache with
python2 versus python3 compatibily due to relative imports.

The test file is now moved to the top level directory as well.
Encode communication with subprocess.Popen explicitly

Python3 makes it necessary to explicitly distinct between binary and
string data. Therefore communication with files and pipes must be
encoded either
 a) using text streams (universal_newlines=True)
 b) manually using .encode(), .decode()

a) seems to be broken and incompatible on python3.2.
b) works on all tested platforms python 2.5 ≤ x ≤ 3.3 and PyPy.
Merge pull request #6 from coldfix/python3-compatibility

Python3 compatibility