Removing misplaced text in directory