Ensure dib-run-parts profiling works with py3 and py2

This change adjusts the "inline" python function used to profile
run-parts duration to make it run successfully on both py2 and py3

Change-Id: If1e6ac6fe528ca0225dcdbe5774545512be9d13a