shorten filename by os.path.basename in guess_filename(obj)