Fix bugs with icon directory argument