Portable file locking library