Is there a specific reason we need to chdir() twice to the same place?