Fix inverted test for chdir().