Improve pencil-util handling.

Change-Id: Ic769fd702308e6328a0fa0d1376a4a3ac012ce9e
Reviewed-By: svevan01