refactor accessing current OS

Checking for the current OS should be done via the OperatingSystem Enum
static method getCurrentOS as this will return the Enum OS which
contains extra information about the OS