Added database upgrade script

upgrade-database.py detects the version of the database, and upgrades it
if necessary.
Merge pull request #3 from qwertyzzz18/upgrade-database

Added database upgrade script