This update for withlock fixes the following issues: update to version 0.5 - modernize for Python 2 and 3 compatibility