gl.check.wd function

Checks the global working directory