Competition of sequential and direct paths in two-photon ionization of He