Femtosecond real-time dynamics of photofragment-trapping resonances on dissociative potential energy surfaces