Fix deployment issues when running from VS

Fix for issue #1354. Writes files depended upon for import publishsettings tests from embedded resources. Tests now run successfully both from VS and on the command line.