[modify.pl] fixes

mainly this one:
moving file failed: Invalid cross-device link
(happens when /tmp is mounted as tmpfs)