Always unlock the lock

It is possible for block() to throw an exception that is caught by the
function caller. In the previous behavior, this would leave the program
executing, but the lock locked, potentially causing a deadlock.
Merge pull request #1 from Jeffrey903/master

Always unlock the lock