Make update hook work with rvm-installed ruby

This change detect if there is RVM-installed ruby for current user and use it. Otherwise, if no RVM-installed rubies found, or RVM not found at all, fallback to system-wide ruby installation