Time-dependent wavepacket algorithm for inelastic molecule-molecule scattering