puppetmaster: fix reimage.sh

also a couple of cosmetic fixes

Change-Id: Ief8ef92490f781ce159061b6cebd5cc1203d3d55
Merge "puppetmaster: fix reimage.sh" into production