Fixes a graphite key formating bug.

* Fixed a bug where having both API key and prefix empty was giving
  a metric key starting with a dot.