Fix re-raising exceptions in locked file to preserve stack trace.
Merge pull request #79 from jterrace/raise-fixes

Fix re-raising exceptions in locked file to preserve stack trace.