Add used validation around tags and branches names
BUG: Using the wrong index which was causing a crash

The wrong index was used which caused meant that the array was trying to
access an index outside of the allocated object.
BUG: Fix issue around external diff and folders

Fixed an issue where we are unable to diff file when they are not in the
top level folder. This was fixed by getting the file name instead of the
full file path.

Also changed the class so it now supports 3 way merges.