Fix util.py for Python2

The previous code caused a "local variable 'raw_input' referenced before assignment" exception.