Also use an app context for commands

needed e.g. for flask-sqlalchemy session handling