Platform-independent file locking module