buildman: Move code to remove old outputs