veyron/services/mgmt/lib/binary: Fix cross-fs rename

DownloadToFile writes to a temporary file and then uses Rename when the
download is complete. By default, temp files are written to /tmp, which
is very often on a different filesystem, e.g. tmpfs.

This change puts the temporary file in the same directory as the final
filename.

E0127 13:59:12.732582 10162 impl.go:176] Rename(/tmp/709474347,
/home/veyron/device_manager/dmroot/app-ENvZ2SNjuooscKLZ6TYZ-A/installation-_9GBPvF5uWA/2015-01-27T13:58:48.684075-08:00/pkg/acl)
failed: rename /tmp/709474347
/home/veyron/device_manager/dmroot/app-ENvZ2SNjuooscKLZ6TYZ-A/installation-_9GBPvF5uWA/2015-01-27T13:58:48.684075-08:00/pkg/acl:
invalid cross-device link

Change-Id: If89b1d310ed0de63b98461cfc2172e8f3fd80b23
1 file changed
tree: 90762588a3207adf73396f10e72b02fb0413d361
  1. lib/
  2. profiles/
  3. runtimes/
  4. security/
  5. services/
  6. tools/