Add a create-or-open function.