Fixed Issue 45, Issue 44, updated base64 functions to handle utf-8 encodings.