common/filelock.py: refined.