Fix thresh and filename bug

Added option for fixing threshold.  Removed bug where full path to image
file was quoted in output files, rather than just filename (without
extension).