Make sure that a reverted file has the same permissions as the original file