Asserting that the call to chdir succeeds in this test. Fixes some -Wunused-result warnings.