Added a new flag: --tmp-location

Added a flag for where to store temporary files (for progress)
Fixed a problem with the sending of incomplete JSON responses