Fixing Issue #9. The check for a valid directory was broken when the dir exists, but the server can not read.