Make tilde expansion work on Windows

* use Home() to return users home on Windows as well
* only match strings starting with tilde
* fix tests on Windows
if its old enough not to have this, we probably should not support it :). The agent will probably only support windows 2008 and above.