sort safe base16 to/from base64 conversion with filename and url safe characters written in pure javascript