Fix to directory_test for non-Windows builds.