Fix chdir in loop

1 job for master in 11 minutes and 5 seconds (queued for 1 second)
Status Job ID Name Coverage
  Test
passed #974
test

00:11:05