Lamplighter groups, bireversible automata and rational series