Revert "Fix unused return value warning for chdir()"