test_localhost_scope: remove temporary socket file after each run

refs #3002

Change-Id: I1219b469ecfce954dd326f591a6ee1be9d4ffdf3
diff --git a/test_localhost_scope/in-master.sh b/test_localhost_scope/in-master.sh
index 7149fd6..d2f8d7f 100755
--- a/test_localhost_scope/in-master.sh
+++ b/test_localhost_scope/in-master.sh
@@ -4,10 +4,11 @@
 workdir=$(pwd)
 
 clean_up() {
-    r=$(rm $HOME/.ndn/client.conf 2>&1)
-    r=$(killall socat 2>&1)
-    r=$(ssh $CTRL_B "killall ndn-traffic-server;\
-        sudo killall nfd" 2>&1)
+    rm -f $HOME/.ndn/client.conf
+    killall socat
+    rm -f /tmp/localhost-test-B.sock
+    ssh $CTRL_B "killall ndn-traffic-server;\
+        sudo killall nfd"
 }
 
 # start nfd and ndn-traffic-server on hostB
@@ -24,7 +25,7 @@
 
 # send interest
 response=$(ndnpeek -p ndn:/localhost/test-in/A 2>&1)
-if [[ ! -z $response ]]
+if [[ -n $response ]]
 then
     echo "FAIL: Expected no data come back for ndn:/localhost/test-in/A, Actual: '$response'"
     clean_up