f90bdc5957
Use the current document's directory unless the directory field has already been edited and the current document has not changed. Otherwise, prepend the current document's directory to the drop-down history in case it is wanted. This is useful to avoid losing the edited directory when it is less likely the user wants to use the current document's directory.