Factored out location name + parameter name combination.

There's a unicode problem in here; this change makes it easier to test.
Added test that demonstrates the unicode problem
Added fix for unicode encodeerror