Use an alternative function to query the executable path for a target process. Add more tracing. refs: #1896