Attempt to solve the invalid escape error from rhel6

re #6175
Attempt to solve the isssues of UnitTest in Win

Wrapping exceptions to try to get clear messages of failure at jenkins.

Using relative path for the temporary folder.

re #6175