Allows file modes to be specified as strings