Fix crash and dry_run

I have fixed some issues with passenger-4.0.38 and gctools.

I also see this bug. This patch fixes this.
https://groups.google.com/forum/#!topic/phusion-passenger/Kdy8Cr0EfKA