Improve version check

Move version check so it is the very first thing we do.
Perform version check for all platforms
Ensure backwards and forwards compatibility
Merge pull request #696 from bmng-dev/Issue-#689

Improve version check.