path: do not segfault when program return 0

Change-Id: I42d2be85e65e5f351df6e18f441074fa3c44d455
Reviewed-on: http://gerrit.aldebaran.lan:8080/13523
Reviewed-by: hcuche <hcuche@aldebaran-robotics.com>
Tested-by: gerrit