Added an explicit ORDER BY instead of relying on SQLite to always order by primary key

Also prettied up some progress reporting