Write file modes in four digits (leading zeros)