perf tools: Introduce copyfile_offset() function