You seem to know just enough about electricity to be dangerous. Please stop, and get someone more knowledgeable to comprehensively sanity-check your idea. Or just buy a battery charger from a car supply store.
That "electrical screw driver" seems to include a voltage tester, probably one designed for the mains voltage of your country (probably 110 volts or more).
Voltage is not an absolute value: it is always relative to some other reference point. In normal houses, the "zero volts" reference level is "ground", or more specifically, either a dedicated grounding electrode stuck into the ground, or in some countries, it is allowed to use bare metal water pipes going through the ground as an electrical grounding/earthing point.
There is also the concept of an electrical circuit. When using electricity for power, you'll need two conductors: one for electric current to travel from the power source to whatever you need powered, and another for the current to return to the source. With just one point of contact, you may get a zap of static electricity (which may be dangerous in itself, if the amount of electric charge is large enough), but to get "properly electrocuted", you would need two points of contact, so that you'll become part of an electrical circuit with enough power to harm you.
With power lines, earth/ground is often used as the return route, to save on the amount of copper/aluminium required for the wires. This makes mains electricity always dangerous: if you are not completely elecrically insulated from the ground and touch a mains wire, a circuit will form between the power plant, mains wire, you, and the ground, and you will get shocked in a continuous manner until a fuse blows, a breaker trips, or you manage to disconnect your self from the circuit.
In the case of "electrical screw driver", the tip of the screwdriver provides one contact point... and the other contact is through you. The tester includes a resistor that is supposed to limit the electric current through the screwdriver to a harmless level. But you should understand that the tester in the screwdriver is essentially just a "would this shock me if I touched it unprotected?" kind of tester, designed for your standard mains voltage level.
Batteries like the ones you're planning to charge, on the other hand, use a much lower voltage, often about 6 or 12 volts. The voltage is determined by the number of individual cells in the battery and the type of electrochemical reaction the battery is based on.
When the UPS is plugged in, its internal workings are connected to the building's ground/earth reference through the ground/earth wire in the power cord, and so the UPS's "zero volts" reference point will be the same as the building's.
When you touch any point of the charging circuit with the screwdriver, there is just one point of contact into the charging circuit, so there will be no complete circuit through the screwdriver+you back into the charging circuit. And even if you grabbed the bare opposite-polarity charging wire in your other hand, the voltage for charging the batteries would probably be too low to light up the tester designed for mains voltage.
But what happens when you unplug the UPS? Now the UPS is still trying to produce mains voltage, but it will have no connection to the building ground/earth. Effectively, its internal workings are no longer firmly anchored to the building's zero-volts reference level, and may "drift".
When the UPS is producing mains-equivalent power without a ground connection "anchor", its internal workings will "float" at a voltage level that is typically half of your mains voltage. And that includes the charging circuit in its entirety: as the batteries are also insulated from the building ground/earth, the negative half of the charging circuit might be at the level of (half of your mains voltage) relative to the house, and the positive half will be at (half of your mains voltage + 12 volts).
For the battery, the only thing that matters is that the difference between the positive and negative contacts matches the voltage the battery's designed for. But for people around your contraption, it will be hard to predict which two things could give you a half-mains-voltage zap when touched at the same time.
But adding extra batteries in parallel to the UPS's built-in one may overload the UPS's charging circuit.
If you want to charge batteries, you should go to an automobile supply shop and buy a regular battery charger that can provide the correct voltage. They would be easier to use, and usually would have charging circuits that can adapt to different battery capacities: the one in the UPS may be optimized to the exact capacity of the UPS's battery and may get easily overloaded.