'Generates an AES key and an initialization vector, and opens
a file in the `store_dir` directory with a
pseudorandomly-generated filename.
Args:
store_dir (str): the directory to create the secure
temporary file under.
Returns: self'

def __init__(self, store_dir):

    self.last_action = 'init'
    self.create_key()
    self.tmp_file_id = base64.urlsafe_b64encode(os.urandom(32)).strip('=')
    self.filepath = os.path.join(store_dir, '{}.aes'.format(self.tmp_file_id))
    self.file = open(self.filepath, 'w+b')
    super(SecureTemporaryFile, self).__init__(self.file, self.filepath)
