OOP lock file implementation using php flock