When you deploy the site, you need to make sure that the "demosite" folder is an application. In IIS Manager, right-click on the folder and select "Convert to Application". Your app-relative paths (~/demosite.master) will then resolve to the correct path.
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer