A version of this was collected in New Zealand in the 1930s from some railwaymen. It possibly is an adaptation of the various 78s that were around before then, or maybe the Caribou gold rush song (there was plenty of international travel with the goldrushes), but the lyric takes quite a different track (excuse the pun):
(Chorus)Railway Bill, Railway Bill,
He never worked an he never will,
They'll fire old Railway Bill.
Way down the line, at any time,
Who's that working on the railway line?
Why there is poor old Bill.
We'll bang and strike, this steel spike,
Nobody works like good old Mike,
But never poor old Bill.
Go toot the peeper, go press the beeper,
Bill he' a railway sleeper,
Go wake up poor old Bill.
(New Zealand Folksongs, ed. Neil Colquhoun, 1972.)