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 I get this right, this is due to the limitations of windows regarding file handlers, please add a comment to prevent anyone to ever remove this.