Added more robust and redundant method for getting the process ID closes #1955