factor out a piece of common code that tests a string for true condition...

... -yes, true, non zero, on

In a number of places a test of a string for one of true, yes, on or non zero is made to set a boolean value, this factors it out. 

The best place I could find for it was os_calls where some other string fucnstions are (g_hexdump etc)