Update project files to use SolutionDir and nuget
Fix extraction of references from MD projects

This now uses those that have been computed by MSBuild. As a result
we can use $(SolutionDir) and friends in reference paths

Also make nugetinstaller for tests more robust
Merge pull request #364 from rneatherway/issue336-clean2

Fix #336 and #349