Fix an error when attempting to auto-complete from an emtpy dir list