Added: can now read the dump from stdin
Fixed: bug that make the script wait for a psql that never ends

Note: the origin of the bug is still unknown but things seems to work
fine when closing the pipes in the reverse order of creation.