updated renaming scripts to handle single directories