packaging: pythonlib: adopt utils procesTemplate and escape

Change-Id: I842f44ca4915e892074b75e2349ad8ab761f773d
Signed-off-by: Alon Bar-Lev <alonbl@redhat.com>