Don't rename a directory to a directory

Test by @EdShaw!

Closes #227
auto merge of #246 : alexcrichton/cargo/issue-227, r=wycats

Test by @EdShaw!

Closes #227