Check working directory in debug script

Signed-off-by: George K. Thiruvathukal <gkt@cs.luc.edu>