It looks to me like the code is using a relative path to find the scripts and therefore it is wrong. Taking a look at where it is actually failing it is in MySqlDbProvider
(or the sqlite version if you're using that). In both of these it is relying on the client
settings being properly set early on. The rebuild process ultimately calls Util.RunProcessWithInput
which uses the Settings.RootDir
as the default path. The command must be relative to that. It appears in your case that the root dir isn't getting set properly during startup.
This code is really old and probably out of date. Personally if I were you I'd just fix up the code to get it to do what you want as all this indirection is just making it hard to read and use. It probably isn't worth trying to debug this aspect of the code.