Saves and restores current directory for detailed tests
Merge pull request #1370 from NovaDenizen/fixtest

Saves and restores current directory for detailed tests
Merge remote-tracking branch 'upstream/master'