When rebuilding dumpfile, use a proper mode string to open it

Also replaced "-q" with clearer "--quiet" option.