Fix get_all_parameters() in Python 2.6.

Shlex does not support unicode string input. Encode input and decode
output when using it.