mrstats: Fix bug in print fields

min and max were switched around erroneously.
File permissions on open now set to 0666

Note this does not mean that these are the permissions that will
actually be allocated: this will be masked with the user's umask
beforehand. This is probably the most appropriate permissions to request
for file creation...
NIFTI1: fix handling of qfac = -1 cases in the qform write-out