Cross-platform fix version.sh

version.sh now works also on linux properly.
Merge pull request #335 from fyrz/version-script-cross-platform

Cross-platform fix version.sh