tools.ps.macosx: use trim-head-slice, simpler.