Using execv instead of execvp

Function executeExternalCommandHelper added. To use it, simply call this helper function instead of execvp at line 161 and 180. There are known issues with this helper function. I will try to work on it later.