Update utils.copyFile to preserve permissions