def createdecryptedfilename(filename):
    """
    Determine a filename to save the decrypted diskimage to.
    """
    i = filename.rfind(".")
    if i<0:
        return filename + "-decrypted"
    return filename[:i] + "-decrypted" + filename[i:]