Explicitly set the current working directory when running tests

Because of the profile directory searching algorithm, if the current
working directory has a directory named 'profile_default', that will
be used instead of the temporary profile directory the tests expect.
Merge pull request #6237 from jasongrout/iptest-profile-dir

Explicitly set the profile directory when running tests