def ensureDirectoryExists(directoryName)
      if File.exist? directoryName
        if not File.directory? directoryName
          raise "Cannot create directory #{directoryName}, already exists as a non-directory file"
        end
      else
        puts "Creating missing directory #{directoryName} ..."
        FileUtils.makedirs(directoryName)
      end
    end
def ensureDirectoryExists(directoryName)
      if File.exist? directoryName
        if not File.directory? directoryName
          raise "Cannot create directory #{directoryName}, already exists as a non-directory file"
        end
      else
        puts "Creating missing directory #{directoryName} ..."
        FileUtils.makedirs(directoryName)
      end
    end
Cause a directory to be created if it does not already exist.
 Raise an error if it does not exist and it cannot be created.