Hi Johan,
It is a very simple matter. If you want to run a copy of your production site on your local dev machine, you must use the same url structure in the dev environment as you have on production. If it is a root level site on production it needs to be a root level site on your dev/test environment. If it is running in a virtual directory on production then it must run in a virtual directory with the same name on a dev/test environment.
So for example when I run a copy of www.mojoportal.com on my local machine I have to run it as http://localhost/ I cannot install it as http://localhost/mojoportal and expect it to work correctly with content that was created on production.
When I create content with images here on mojoportal.com the image gets a relative url like src=/Data/Sites/1/somefolder/someimage.png
The thing you need to understand about a relative url is that it is relative to the root of the site not the root of the virtual directory. So for example if I setup my site at http://localhost/mojoportal/ and then I add an image to the content, it will have a relative url like src=/mojoportal/Data/Sites/1/somefolder/someimage.png, again it is relative to the root of the site not the root of the virtual directory.
So in your case http://localhost/ points to inetpub\wwwroot, therefore a relative url for an image that was entered into the content on production is going to have an url like src=/Data/... and naturally that resolve to the root of the web site and a folder named /Data.
mojoPortal can run happily as a root site or as a virtual directory site, but once you start adding content you cannot go back and forth without breaking urls in your content. It is just how urls work.
Hope it helps,
Joe