Index: tools/gformat.py
===================================================================
--- tools/gformat.py	(revision 8860)
+++ tools/gformat.py	(revision 8867)
@@ -35,5 +35,5 @@
   
 
-NODE_DIR = os.getcwd() + '/../nodes'
+NODE_DIR = os.path.dirname(__file__) + '/../nodes'
 __version__ = '$Id$'
 
@@ -686,4 +686,6 @@
       import SocketServer
       import CGIHTTPServer
+      # CGI does not go backward, little hack to get ourself in the right working directory.
+      os.chdir(os.path.dirname(__file__) + '/..')
       try:
         PORT = int(sys.argv[2])
