Cmd fixes

Modified PatchExecutable such that it works on windows. Added tests as well as a small fix in home_tests.
As for this one I'm kind of clueless.

As you can see the final 2 lines in the script are echo %list% and echo %list > %0.out, but the output comes out to be different regarding that space. However it is definitely there, at least on Windows 8.