Extract error text into errors.py

Makes command.py a lot more readable.