added URI encoding for dynamic query

Because graphite can't cope with special characters, I URL-encoded my metric names (like my.server.my%20metric). If the dynamic query doesn't get URL encoded, 'my%20metric' comes in as 'my metric' at graphite, which of course will fail.