Lots of fixes from Philipe Troin: * Fixed open and creation modes and permissions for QFA and table-of-contents files in dump and restore. * Fixed the archive file descriptor handling enabling it to be 0. This can happen in some cases when shell redirections are used. * Delayed the opening of archive file until after suid had been dropped (fixing a possible security issue if dump is suid). * Fixed the 'S' command handling in the rmt client part. * Modified the end-of-tape script handling to print out statistics (and stop the timer) before launching the eot script. Also, the eot script does not get run anymore when using -M (which makes sense) or when multiple tapes are listed on the command line (-f tape0,tape1,tapen) (which also makes sense).