Add url safe function for Base64 encode
See http://stackoverflow.com/questions/6041426/how-to-pass-slash-in-an-url