flock() wrapper. Auto-create locks
