Use flock per discussions on apr_file_lock issues