Os detection

Improved OS detection