Changes
if title blank then use alt
        if alt ~= "" and alt ~= nil then
            result = result .. "|alt=" .. alt;
        end
        if border == "yes" then
        if title ~= "" and title ~= nil then
            result = result .. "|" .. title;
        elseif alt ~= "" and alt ~= nil then
            result = result .. "|" .. alt;
        end
        result = result .. "]]";