Write test without chdir.

This avoids having the coverage files dumped in the working directory of
the "dx" process and interfering with the directory tree validation.