in <Module> tag, put a url (such as Url="_catalogs/masterpage" ) and put RootWebOnly="TRUE"

The <file> tag will also be created with a default url property. Make sure to edit this so that it is correct. By default, it will create a path starting with the name of the module. And if there is no such folder already with that name beneath the Module path, the feature will create one. The actual path is designated by both the <module> url property and the <file> url property (that is, both of those properties are combined).

Add Type="GhostableInLibrary" IgnoreIfAlreadyExists="TRUE" to the <file> elements. IgnoreIfAlreadyExists="TRUE" means "overwrite existing file". Type="GhostableInLibrary" setting is used when a file is placed into a library. If a file is placed outside of a library, Type="Ghostable" would be used.

Change the <file> tags so that it is not self-closing.

Add some Property tags.Columns in the master page correspond to file object properties indicated in the module xml. Other file properties in the xml will also be added to the "property bag" that do not correspond to master page columns (see <property> tags above).

First, it is good practice to always add
<Property Name="FeatureId" Value="$SharePoint.Feature.Id$" Type="string"/>

On compliation, Value="$SharePoint.Feature.Id$" will be replaced with guid of feature.

For a master page, the following metadata will be added via the property tags