tools: error handling on journal import/export

Actually propagate nonzero returns codes!  Also
add checks on return values of I/O functions so
that someone doesn't think they've successfully
exported a journal if they haven't, and some
validation of the header pointers during import
so that people find out with a nice error
instead of an assertion if something is up.

Signed-off-by: John Spray <john.spray@redhat.com>

Fix compile issue in the position value cout.

Signed-off-by: Greg Farnum <gfarnum@redhat.com>