Clean up local variable usage - Remainder

Minor cleanups in a couple ofplaces:
* Config funtions
* Stackforge
* TLS

Combined a couple of smaller changesets that are loosly related

Change-Id: Ifa16f2e4c0eca0ef3401c0dfdc4f3d91809021a5
diff --git a/lib/tls b/lib/tls
index e58e513..62a4ae3 100644
--- a/lib/tls
+++ b/lib/tls
@@ -84,6 +84,7 @@
         return 0
     fi
 
+    local i
     for i in certs crl newcerts private; do
         mkdir -p $ca_dir/$i
     done