move rvm-installer to functions to avoid partial donload problem