Ensure that empty array is stripped in getAccessToken

This maintains the previous behaviour where an uninitialised access token
would return null.
Remove some escaping when creating claimsets

Fixed #166
Merge pull request #181 from ianbarber/master

Ensure that empty array is stripped in getAccessToken