LiveScript - 166
(Replace spaces with tabs.)
(a=->(s=require \fs)readdirSync(it)map (f)->f=it+'/'+f;r=f.replace /\s/g,i='';(while f!=r&&s.existsSync r=>r+=i++);s.statSync(f)isDirectory(s.renameSync f,r)&&a r) \.
Based on nderscore'snderscore's optimized version of c.P.u1c.P.u1's answeranswer.