Refactor OS and architecture detection into separate functions.
Refactor OS and architecture detection into separate functions.

tianzhihen/nvm,mmorejon/nvm,CristianCantoro/nvm,hkdobrev/nvm,jhliberty/nvm,creationix/nvm,LeeLovCY/nvm,misterdjules/nvm,cnpm/nvm,jaawerth/nvm,mirydz/nvm,cjac/nvm,Theodeus/nvm,vinaykaradia/clone-nvm,chinazhaghai/nvm,parasaro92/nvm,icyflame/nvm,edwmurph/nvm,slariviere/nvm,bevacqua/nvm,mmorejon/nvm,modulexcite/nvm,dfackler/nvm,gtdeng/nvm,SampleLiao/nvm,WY08271/nvm,Theodeus/nvm,hkdobrev/nvm,PeterDaveHelloKitchen/nvm,edwmurph/nvm,devedbox/nvm,DigitallySeamless/nvm,williamboman/nvm,evocateur/nvm,joneit/nvm,owen-it/nvm,michael-ni/nvm,CristianCantoro/nvm,gtdeng/nvm,lukechilds/nvm,Kuzirashi/nvm,christophercaburog/nvm,kumaria/nvm,vinaykaradia/clone-nvm,bevacqua/nvm,thomasf/nvm,owen-it/nvm,domenicosolazzo/nvm,icyflame/nvm,cjac/nvm,IonicaBizauKitchen/nvm,Salahudeen/nvm,creationix/nvm,pmq20/nvm,evocateur/nvm,hanhailong/nvm,woss/nvm,hanhailong/nvm,misterdjules/nvm,Kuzirashi/nvm,lukechilds/nvm,ljharb/nvm,pmq20/nvm,PeterDaveHelloKitchen/nvm,jhliberty/nvm,parasaro92/nvm,slariviere/nvm,wskplho/nvm,reybango/nvm,Richardphp/nvm,diegofcb10/nvm,cnpm/nvm,chinazhaghai/nvm,Ingelheim/nvm,tlevine/nvm,elrasguno/nvm,Salahudeen/nvm,greyhwndz/nvm,egilkh/nvm,youleiy/nvm,WY08271/nvm,mirydz/nvm,psychoss/nvm,wskplho/nvm,dfackler/nvm,wahyutaufik/nvm,youleiy/nvm,jaawerth/nvm,domenicosolazzo/nvm,ljharb/nvm,modulexcite/nvm,williamboman/nvm,cirosantilli/nvm,devedbox/nvm,JasonChrYoung/nvm,bbuck/nvm,kmctown/nvm,jbergstroem/nvm,JasonChrYoung/nvm,thomasf/nvm,jbergstroem/nvm,woss/nvm,nontage24/nvm,greyhwndz/nvm,cirosantilli/nvm,tlevine/nvm,DigitallySeamless/nvm,michael-ni/nvm,diegofcb10/nvm,wahyutaufik/nvm,scq000/nvm,bbuck/nvm,Ingelheim/nvm,scq000/nvm,LeeLovCY/nvm,egilkh/nvm,JanChw/nvm,IonicaBizauKitchen/nvm,reybango/nvm,JanChw/nvm,fnogatz/swivm,joneit/nvm,kmctown/nvm,Richardphp/nvm,christophercaburog/nvm,tianzhihen/nvm,nontage24/nvm,SampleLiao/nvm,PeterDaveHello/nvm,psychoss/nvm,kumaria/nvm,elrasguno/nvm,PeterDaveHello/nvm