fix backtrace printed when cannot get lock.
change lock error handling code so exceptions have useful info and
exception handling in one place.
add test case for when cannot get lock.
Is there an error message when trying to diff non-existing files?
found: No such file or directory
not: No such file or directory
Is there an error message when trying to add non-existing files?
found: No such file or directory
not: No such file or directory