Issue17 mac support

Both os_test.q and hk_test.q pass on Linux, Windows and Mac.