throw error if directory does not exist this accomodates non-Fortran 2018 error stop with variable character