So I came accross a couple of issues when rebuilding the database on Linux.
1. And the most annoying, is that the file format was set to windows only line formatting ... so when you executed the rebuild-dbs file, it just refused to run because of line formatting.
Using an app called dos2unix i converted the line formatting, which solved this problem.
2. sqlite3.exe exist ... good job, but what about sqlite3 .... you know, for Linux/Unix types ... sigh -_-... so yea I downloaded a copy of that too.
That solved all the database rebuild issues.
See link for a download of the new rebuilt-dbs script  (with proper line formatting) and a copy of the sqlite3 executable for Linux ... if you don't trust me, just delete the sqlite3 executable, and snag a copy from here  that's all I did anyway, but I would be leery of adding executable's to my servers, so ... yea to each their own.