russian typo
fucking rvm
file.close
use pipes instead of ruby's File crap
removed unneeded cp