Operating system detection

Thank you @Krivo; this is clearly useful, and in a way, a piece of what I had in mind.