Preserve file permissions when copying

I'm a bit suspicious of why this hasn't reared it's head before.