Preserve entropy in TokenGenerator

base_convert loses precision on large inputs. Use URL-safe base64_encode instead.
Merge pull request #953 from jmclean/patch-1

Preserve entropy in TokenGenerator