Added subdirectory checking for checkHTMLdir and checkPDFdir