Added option to output to stdout
Fixed (and tested) postgres dump