This should make shutil.move use rename, which is atomic, avoiding
losing data when interweaving writes happen.
This will closejoelthelion/autojump#358.
The original implementation used str.encode() on input and str.decode() on
output. However this would cause UnicodeDecodeError since certain characters
can't be encoded / decoded in ASCII.
The new solution is to use unicode() on all input strings and output UTF-8
encoded strings. This makes the assumption that the shell can handle UTF-8
strings.