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.
Merge pull request #23 from axe-felix/master

added URI encoding for dynamic query
Make generateDynamicQuery function more generic

Increases reusability of this function. Used later to build graphs dynamically.
Allow generation of dynamic graphs

Uses the dynamic queries functions to allow the generation of dynamic graphs.
Addresses #8