Fix Python tests in debug mode under Windows & ctest.

Refs #10745
Merge pull request #96 from mantidproject/bugfix/10745_win_debug_python_tests

Fix Python tests in debug mode under Windows & ctest.