Fix mode of a file