Image: Fix time setting for old kernels

This is a better fix for futimes() on kernels not supporting O_PATH.
The previous fix broke when copying a device, as it tried to open it
and got and error.
Merge pull request #2023 from alexlarsson/old_kernel

Image: Fix time setting for old kernels