Three people have been arrested and charged with knowingly exploiting a software glitch that allowed vending machines on the Long Island Rail Road and Metro-North Railroad to dispense free tickets.