Updating the insertion XML generator to escape ampersand, and adding an
ensure FTP connection before transfering the state.