Update script

Be sure this "parent" element is link for Parent Directory before add "parent" class.