Fix unit test error when working directory is too long.