Add support for ConnectTimeout and BatchMode

As requested by Daniele Grigori, from CNAF.