diff --git a/product/ERP5/Tool/TemplateTool.py b/product/ERP5/Tool/TemplateTool.py
index decf53712d7b92f4d7088cc67011f708c797eba7..2ef6039850957fb6a4b1e42ef091f5b5bf968091 100755
--- a/product/ERP5/Tool/TemplateTool.py
+++ b/product/ERP5/Tool/TemplateTool.py
@@ -136,12 +136,16 @@ class TemplateTool (BaseTool):
       """
         Export BT in tarball format 
       """
-      path = business_template.getTitle()
+      tmpfile_path = os.tmpnam()
+      tmpdir_path = os.path.dirname(tmpfile_path)
+      path = os.path.join(tmpdir_path, business_template.getTitle())
       export_string = business_template.export(path=path)
       if RESPONSE is not None:
         RESPONSE.setHeader('Content-type','tar/x-gzip')
         RESPONSE.setHeader('Content-Disposition',
-                           'inline;filename=%s-%s.bt5' % (business_template.getTitle(), business_template.getVersion()))
+                           'inline;filename=%s-%s.bt5' % \
+                               (business_template.getTitle(), 
+                                business_template.getVersion()))
       try:
         return export_string.getvalue()
       finally: