Use URL-safe base64 encoding for ids

This prevents issues related to passing IDs in URL paths by making them
url-safe.

RFC4648 has details: http://tools.ietf.org/html/rfc4648#section-5
Merge pull request #83 from eric/use-urlsafe-base64-encoding-for-ids

Use URL-safe base64 encoding for ids