Dynamics and Interaction of Vortex Lines in an Elongated Bose-Einstein Condensate