Cmd fixes

Modified PatchExecutable such that it works on windows. Added tests as well as a small fix in home_tests.
note that you can use backticks ( ` ) so that you don't have to escape the quotes:
```go
c.Assert(output, gc.Equals, testFunc+` "foo" "bar baz"\r\n`)
```