2and3

These are the required changes to make param compatible with both 2 and 3.

Tested with my own tool which uses param, on Python 2.7, 3.4 as well as PyPy 2.2.1 (2.7).