Only write back file attributes if any of them really changed.