Fix parsing empty base class lists

Currently, this:

```python
class X(): pass
```

is a syntax error. This PR fixes that by checking for a closing parenthesis first.