updated match.py

Now correctly connects to db and writes matches