diff --git a/releng.control/removeUtils.shsource b/releng.control/removeUtils.shsource
index be945a16400d6a0cb3cdd753d0e1d6ac8d9adf89..89b604cea9e8ae08f0d5c8267d5f2824ffb5ca5b 100644
--- a/releng.control/removeUtils.shsource
+++ b/releng.control/removeUtils.shsource
@@ -37,13 +37,13 @@ function removeIf ()
 function removeArtifactsDirIf ()
 {
        # echo "arg: $1";
-       
-       if [ -z $1 ]
+       foundDirectory=$1
+       if [ -z "${foundDirectory}" ]
          then
            echo "ERROR: No argument. This function requires a directory as an argument. " ;
            return 1;
          fi
-       foundDirectory=$1
+       
        nSave=$2
        
        if [ -z $nSave ]
@@ -51,7 +51,7 @@ function removeArtifactsDirIf ()
           nSave=1;
        fi   
        
-       if [ ! -d $foundDirectory ] 
+       if [ ! \( -d "${foundDirectory}" \) ] 
        then
          echo "ERROR: " "${foundDirectory}" ", is not a directory. This function requires a directory as an argument. "
          return 2;