Added comments and cleaned up some of the script
Added a fix to the /tmp/ directory to use the $HOME variable as part of the path.
added a flag to disable adding the merge driver to the attributes file. This caused issues I could not resolve with sourcetree.
cleaned up code and added comments