Temp directory in a different partition than the destination will make rename fail

Rename is a simple hard-link + unlink at the old location. This does not work across different partitions/devices.

Example in my box:
ln ~/file.txt /tmp
ln: failed to create hard link ‘/tmp/test.txt’ => ‘/home/ereslibre/test.txt’: Invalid cross-device link

This is the exception that was being raised by vagrant when trying to move the downloaded image to my home directory.