directory_to_dict: return base64-encoded values