Small tweaks to the hack scripts to make them simpler

Please do with this as you please (including rebasing and/or squashing it), especially under clause (c) of the DCO.