To deal with bash vs csh stupidity use current-directory instead of PWD since the logical path is lost in most cases causing issues in finding db files.