It's probably croaking because your CLI isn't aware of the current path/cwd and thus isn't able to use those relative paths to find required resources. Fix your CLI ability to know where it's working from and use the appropriate includes_path, and you will likely have more success.

Although, why are you even loading application_top anyway? What specific Zen Cart capability do you need if you're making GD images?