Fixes #4466: add detect_os.sh script

http://www.rudder-project.org/redmine/issues/4466

Not finished yet, an error with missing perl-5.12.4.tar.gz file occurs here