Added tests for hookCommand

This PR fixes a small bug on windows and adds more unit tests for the uniter.
(because those asserts might fail, and we'd never get here)