squash support

Added some code to check before writing histfile - and to squash if
asked to do so. If no squash, then creates a new name for output by
appending current datetime to histfile name.