More unicode fixes

Don't use % with bytes, Python 3 won't have it.

Make sure to convert paths to bytes before _chdir().

Don't use raw bytes from the server as exception message.

Handling paths on Windows is annoying: local part is assumed to be in
local encoding (cp1252 on my machine), remote part is assumed to be
UTF-8.
Fixes spaces in filenames
Adds tests