Allow specification of working directory via constructor argument and related cleanup

Change-Id: Ifc73371c920d1d4e47b1fa04e57de5aebd2a6b40
diff --git a/examples/ping-demo.py b/examples/ping-demo.py
index 550c0df..5db8087 100644
--- a/examples/ping-demo.py
+++ b/examples/ping-demo.py
@@ -80,7 +80,7 @@
 
     # Start ping server
     info("Starting pings...\n")
-    pingserver_log = open("/tmp/minindn/c/ndnpingserver.log", "w")
+    pingserver_log = open("{}/c/ndnpingserver.log".format(ndn.workDir), "w")
     getPopen(ndn.net["c"], "ndnpingserver {}".format(PREFIX), stdout=pingserver_log,\
              stderr=pingserver_log)