Rearrange files to appropriate folders