Take the basename of the script before concatenating it with the build dir.
diff --git a/Lib/distutils/command/build_scripts.py b/Lib/distutils/command/build_scripts.py
index 1829734..6467e65 100644
--- a/Lib/distutils/command/build_scripts.py
+++ b/Lib/distutils/command/build_scripts.py
@@ -52,7 +52,7 @@
         self.mkpath(self.build_dir)
         for script in self.scripts:
             adjust = 0
-            outfile = os.path.join(self.build_dir, script)
+            outfile = os.path.join(self.build_dir, os.path.basename(script))
 
             if not self.force and not newer(script, outfile):
                 self.announce("not copying %s (output up-to-date)" % script)