When you deploy a new version of mojoPortal over an existing site of course it will and should overwrite the mojoPortal files but it will not affect any content files such as images uploaded by users. All of the site content except user uploaded files is stored in the database.
You will want to make sure you backup your Web.config file and restore any customizations such as the machinekey from the old web.config into the new one.
But you really need to know what version you are deploying, you definitely do not want to deploy an older version of mojoPortal on top of an existing installation of a newer version of mojoPortal.
So assuming the dev version is a newer build of mojoPortal than your production site, you can make a copy of all the files from the production site into your test environment and then deploy the dev build on top of it.
Hope that helps,
Joe