Better checking of GAUSS_EXEDIR
Added lines to check errors in the double-ended approach