Prevent building model as a place and vice versa
Currently, we trust the user to choose their own extension when building. However, this allows mistakes because people can build models as place files or vice versa.
Given that this should be as easy as checking whether the root of a file is a DataModel, it should be trivial to check whether the correct type of file is being built for the specified extension. We should probably do that.
We have protections for syncing a model into a place on the Studio plugin side, but honestly we should probably warn/forbid serving a model in the first place since there's no context in which that makes sense as far as I'm aware.
I think a PR for this should cover build and sync, since it'd be more or less the same line of code in both places.