Use ~/.cache/abzsubmit as the cache directory
Handle failures better in handle_cached_result

Also actually use get_tmpname_for_file in handle_cached_result