   envvars = (options = {}) ->
     options.exclude or= []
 
-    env = """
-    export GOPATH=#{GOPATH}
-    export GOBIN=#{GOBIN}
-
-    """
-    env += "export #{key}='#{val}'\n" for key, val of KONFIG.ENV when key not in options.exclude
+    env = ''
+
+    add = (name, value) ->
+      env += "export #{name}='#{JSON.stringify value}'\n"
+
+    for name, value of KONFIG.ENV when name not in options.exclude
+      add name, value
+
+    add 'GOPATH', '$KONFIG_PROJECTROOT/go'
+    add 'GOBIN', '$GOPATH/bin'
+
     return env
 
   workerList = (separator = ' ') ->

      node scripts/create-default-workspace

      # Sanitize email addresses
      node #{options.projectRoot}/scripts/sanitize-email

      # Run all the worker daemons in KONFIG.workers
      #{("worker_daemon_"+key+"\n" for key, val of KONFIG.workers when val.supervisord).join(" ")}

      go test koding/db/mongodb/modelhelper -test.v=true

    elif [ "$1" == "socialworkertests" ]; then
      $KONFIG_PROJECTROOT/scripts/node-testing/mocha-runner "$KONFIG_PROJECTROOT/workers/social"

    elif [ "$1" == "nodeservertests" ]; then
      $KONFIG_PROJECTROOT/scripts/node-testing/mocha-runner "$KONFIG_PROJECTROOT/servers/lib/server"

    # To run specific test directory or a single test file
    elif [ "$1" == "nodetestfiles" ]; then
      $KONFIG_PROJECTROOT/scripts/node-testing/mocha-runner $2

    elif [ "$1" == "sanitize-email" ]; then
      node $KONFIG_PROJECTROOT/scripts/sanitize-email

    elif [ "$1" == "migrations" ]; then
      migrations
