Issue #3131090 by longwave: Replace assertions involving calls to is_dir with assertDirectoryExists()/assertDirectoryNotExists()