Set ruby hooks dir in ssh service tests
The using of the hooks Override
global variable was causing race conditions in the tests. This avoids using it and instead sets the ruby dir in the testMain
function.
At some point, we should aim to get rid of all global access in our code base.