Fix tests with  <psutil-2.0
Use pwd.getpwuid or getpass.getuser to get current user name
Join paths using more robust path joining function

Fixes #1087
Fix WM bindings tests
Fix UnboundLocalError in logger exceptions handling code
Raise exceptions that are not intercepted when testing

Thus problems like in #1087 will result in build failure.
Merge pull request #1093 from ZyX-I/fix-tests

Some test fixes