Cannot os.rename() a directory

but can os.renames().
Cannot renames either, need to shutil.move

Also, remove the trailing / for the renaming
Merge pull request #1911 from sposs/patch-2

Cannot os.rename() a directory