When associating document by URL only, compute correct reference
When associating a document by reference only, i.e. only inserting the
filename/path/URL instead of copying and/or renaming the file next to
the bibliography file, correctly compute the reference based on the
absolute or relative document path, respectively.
This commit fixes a bug where if a relative path for the reference was
chosen, the current entry's id was used erroneously.