Only encode values, not the whole query string

The calls to `URI.encode` make the requests fail with an error 500:

```
The facts application failed to run, use -v for full error backtrace details: Failed to make request to PuppetDB: 500: Server Error
```