REMOVAL OF DIVERGENCES WITH THE BATALIN-VILKOVISKY FORMALISM