Fixes Python 3.x support in test_winrmconfig

Adds sorting to lists to be compared and some minor refactoring.