Fix bug when link is pointing to pre-existing directory \#156
Description of bug
If a new DSID dir contained a link pointing to a pre-existing directory the commit script would copy it in the wrong way, creating a link pointing back to itself.
Changes introduced
When we encounter a link pointing to a pre-existing directory we don't do anything with it.
Tests
the first one contains a link pointing to a pre-existing directory, the 3rd contains a link pointing to a new (unregistered) directory.
The expected behaviour would be
MadGraphControl_Py8G_2HDMa_4t_MadSpin.py -> ../../510xxx/510250/MadGraphControl_Py8G_2HDMa_4t_MadSpin.py
MadGraphControl_test.py -> ../NEWDIR/MadGraphControl_test.py
Before fix
The bug: 511xxx/511336/MadGraphControl_Py8G_2HDMa_4t_MadSpin.py -> ../../511xxx/511336/MadGraphControl_Py8G_2HDMa_4t_MadSpin.py
After fix
With the expected behaviour:
511xxx/511336/MadGraphControl_Py8G_2HDMa_4t_MadSpin.py -> ../../510xxx/510250/MadGraphControl_Py8G_2HDMa_4t_MadSpin.py
511xxx/511338/MadGraphControl_test.py -> ../../511xxx/511337/MadGraphControl_test.py
NB @cgutscho if !1588 (merged) is an exact copy of this script then this should also be fixed there
Issues resolved
Closes #156 (closed)