 (defun build-specware4 (in-current-dir?)
   (interactive "P")
   (let* ((root-dir (if in-current-dir?
-		       (if (stringp in-current-dir?)
-			   in-current-dir?
-			 default-directory)
-		     (concat (getenv "SPECWARE4"))))
+		       (strip-final-slash (if (stringp in-current-dir?)
+					      in-current-dir?
+					    default-directory))
+		     (getenv "SPECWARE4")))
 	 (dir (concat root-dir "/Applications/Specware/Handwritten/Lisp"))
 	 (bin-dir (concat root-dir
 			     "/Applications/Specware/bin/"

		      sw:common-lisp-host
		      sw:common-lisp-image-file
		      ))
    ))
(defun run-specware4 (&optional in-current-dir?)
  (interactive "P")
  (let* ((root-dir (if in-current-dir?
		       (strip-final-slash (if (stringp in-current-dir?)
					      in-current-dir?
					    default-directory))
		     (concat (getenv "SPECWARE4"))))
	 (bin-dir (concat root-dir
			  "/Applications/Specware/bin/"
