Bug fix on ndnpingclient and experiment script

Mininet host object is passed as a prefix from experiment
to ndnpingclient, string replacement operation on the
prefix fails at the client which crashes the Mini-NDN

Change-Id: I36c1f9e2e455321d8c650fd9711088b7e5ef2b22
diff --git a/minindn/helpers/experiment.py b/minindn/helpers/experiment.py
index a29272a..910b239 100644
--- a/minindn/helpers/experiment.py
+++ b/minindn/helpers/experiment.py
@@ -28,7 +28,8 @@
 from mininet.log import info
 
 from minindn.helpers.nfdc import Nfdc
-from minindn.helpers.ndnpingclient import NDNPingClient
+from minindn.helpers.ndnping import NDNPing
+from minindn.util import getSafeName
 
 class Experiment(object):
     @staticmethod
@@ -70,7 +71,8 @@
         for host in hosts:
             host.cmd('mkdir -p ping-data')
             Nfdc.setStrategy(host, '/ndn/', strategy)
-            host.cmd('ndnpingserver /ndn/{}-site/{} > ping-server &'.format(host.name, host.name))
+            prefix = getSafeName('/ndn/{}-site/{}'.format(host.name, host.name))
+            NDNPing.startPingServer(host, prefix)
 
     @staticmethod
     def startPctPings(net, nPings, pctTraffic=1.0):
@@ -95,7 +97,8 @@
 
                 # Do not ping self
                 if host.name != other.name:
-                    NDNPingClient.ping(host, other, nPings)
+                    destPrefix = getSafeName('/ndn/{}-site/{}'.format(other.name, other.name))
+                    NDNPing.ping(host, destPrefix, other.name, nPings)
                     nodesPingedList.append(other)
 
                 # Always increment because in 100% case a node should not ping itself