sanitize the path before calling an external program

This is useful for calling tpacpi-bat from suid/sgid programs for example not to require users to use sudo command each time they want to change battery charge thresholds.