fixed lots of not-thread-safe things

Most of the things I fixed here were using libc functions that are
fundamentally not thread-safe.
diff --git a/aos/linux_code/linux_code.gyp b/aos/linux_code/linux_code.gyp
index cbae81b..74b788d 100644
--- a/aos/linux_code/linux_code.gyp
+++ b/aos/linux_code/linux_code.gyp
@@ -31,6 +31,7 @@
       ],
       'dependencies': [
         'init',
+        '<(AOS)/common/util/util.gyp:run_command',
       ],
     },
   ],