Added option to encode key as base64 on disk

I had an issue using URL's as keys, so I've added an option to encode them as base64 when writing to disk

Risk: Any files not base64 encoded in the 'persist' folder may cause issues