Recursively create the target directory before renaming a cloned git repository in rustpkg install

Testing this is a little tricky as an intermediate temporary directory is only used for remote git repositories and therefore that path cannot be reliably exercised in the tests.