Fix version and init script

Made init.d script Ubuntu compatible by testing for existence of init.d/functions prior to loading. Fixed init.pp such that it makes use of the $version variable to determine the download path.

Sorry for the half dozen commits to init.pp, my Puppet syntax was a bit rusty.
combined with the change I suggested above, this would become: if $es_url { .. with the resultant es_download_url assignments switched around