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.
%% no changes%% no changes%% uncompressed contents in repothis is a test%% uncompress our working dir copythis is a test%% uncompress our new working dir copythis is a test