Preserve file mode in copySync