Handle MySQL errors so things don't go derpy. Closes #3