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.
abort: repository a not found!
255
requesting all changes
abort: error: Connection refused
255
abort: repository a not found!
255
abort: destination '../a' already exists
1
abort: repository a not found!
255
abort: destination 'q' already exists