(real) file locking for lua