folder-structure upgrading tool in ruby