[PATCH 50/58] buildman: Move reading of the done file into a function