Added tests for hookCommand

This PR fixes a small bug on windows and adds more unit tests for the uniter.
wait... if we're invoking powershell.exe, do we require the extension? I think it would be good if we could make the usual experience writing windows charms to be of writing powershell scripts with the same names you'd use for the same purpose on ubuntu. is this reasonable?