python: Add support for lockdir for filed