lib: lock device when in use by libjgfs2
lib: make file unlock upon close nonfatal