directory_to_dict: return base64-encoded values

refs #6067