Make tests pass under non mac os
Connection param keys with spaces can't be encoded as XML because XML names can't have spaces, so use JSON instead. Needs more testing, but hopefully resolved issue #2.