I haven't quite fixed it yet, but it's almost certainly related to FOLDER in test_sftp.py. When the tests, such as test_K_utf8() fail, it's because the folder isn't empty so the os.rmdir() fails.
Quickly I tried to add a TEST_FOLDER=`mktemp -d` to the test command but that didn't quite work. I think that's still probably on the right track, but I don't have some detail right yet.